github.com/primecitizens/pcz/std@v0.2.1/core/assert/eq.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  
     4  package assert
     5  
     6  import (
     7  	"github.com/primecitizens/pcz/std/core/debug"
     8  )
     9  
    10  func Eq[T comparable](a, b T) bool {
    11  	if a == b {
    12  		return true
    13  	}
    14  
    15  	println("assert.Eq", "failed:", a, "!=", b)
    16  	debug.Abort()
    17  	return false
    18  }