You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
844 B

  1. package til
  2. import (
  3. "strings"
  4. "testing"
  5. "github.com/hermeznetwork/hermez-node/common"
  6. "github.com/stretchr/testify/assert"
  7. )
  8. func TestCompileSetsBase(t *testing.T) {
  9. parser := newParser(strings.NewReader(SetBlockchain0))
  10. _, err := parser.parse()
  11. assert.NoError(t, err)
  12. parser = newParser(strings.NewReader(SetPool0))
  13. _, err = parser.parse()
  14. assert.NoError(t, err)
  15. tc := NewContext(0, common.RollupConstMaxL1UserTx)
  16. _, err = tc.GenerateBlocks(SetBlockchain0)
  17. assert.NoError(t, err)
  18. _, err = tc.GeneratePoolL2Txs(SetPool0)
  19. assert.NoError(t, err)
  20. }
  21. func TestCompileSetsMinimumFlow(t *testing.T) {
  22. // minimum flow
  23. tc := NewContext(0, common.RollupConstMaxL1UserTx)
  24. _, err := tc.GenerateBlocks(SetBlockchainMinimumFlow0)
  25. assert.NoError(t, err)
  26. _, err = tc.GeneratePoolL2Txs(SetPoolL2MinimumFlow0)
  27. assert.NoError(t, err)
  28. }