mirror of
				https://github.com/0glabs/0g-chain.git
				synced 2025-10-31 23:37:40 +00:00 
			
		
		
		
	
		
			
	
	
		
			19 lines
		
	
	
		
			556 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			556 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|   | package noop_test | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"testing" | ||
|  | 
 | ||
|  | 	"github.com/stretchr/testify/assert" | ||
|  | 	"github.com/stretchr/testify/require" | ||
|  | 
 | ||
|  | 	"github.com/kava-labs/kava/precompile/contracts/noop" | ||
|  | ) | ||
|  | 
 | ||
|  | // TestContractConstructor ensures we have a valid constructor. This will fail
 | ||
|  | // if we attempt to define invalid or duplicate function selectors.
 | ||
|  | func TestContractConstructor(t *testing.T) { | ||
|  | 	precompile, err := noop.NewContract() | ||
|  | 	require.NoError(t, err, "expected precompile not error when created") | ||
|  | 	assert.NotNil(t, precompile, "expected precompile contract to be defined") | ||
|  | } |