github.com/philpearl/symboltab@v1.1.4/intbank_test.go (about)

     1  package symboltab
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestIntbank(t *testing.T) {
    10  	ib := intbank{}
    11  	ib.save(1, 37)
    12  	ib.save(2, 43)
    13  
    14  	assert.EqualValues(t, 37, ib.lookup(1))
    15  	assert.EqualValues(t, 43, ib.lookup(2))
    16  	assert.EqualValues(t, 37, ib.lookup(1))
    17  }