diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index b788a923..81cf9219 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -1,6 +1,6 @@ name: Integration Tests -on: +on: push: branches: - main @@ -15,11 +15,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.9" - name: Install cairo-lang run: pip install cairo-lang==0.13.1 - + + - name: Install sympy + run: pip install sympy==1.11.1 + - name: Build run: make build diff --git a/integration_tests/cairozero_test.go b/integration_tests/cairozero_test.go index f921e1af..bcfdc468 100644 --- a/integration_tests/cairozero_test.go +++ b/integration_tests/cairozero_test.go @@ -396,77 +396,3 @@ func memoryRepr(memory []*fp.Element) string { return strings.Join(repr, ", ") } - -func TestFailingRangeCheck(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/range_check.small.cairo") - require.NoError(t, err) - - _, _, _, _, err = runVm(compiledOutput) - require.ErrorContains(t, err, "check write: 2**128 <") - - clean("./builtin_tests/") -} - -func TestBitwise(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/bitwise_builtin_test.starknet_with_keccak.cairo") - require.NoError(t, err) - - _, _, _, _, err = runVm(compiledOutput) - require.NoError(t, err) - - clean("./builtin_tests/") -} - -func TestPedersen(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/pedersen_test.small.cairo") - require.NoError(t, err) - - _, _, _, output, err := runVm(compiledOutput) - require.NoError(t, err) - require.Contains(t, output, "Program output:\n 2089986280348253421170679821480865132823066470938446095505822317253594081284") - - clean("./builtin_tests/") -} - -func TestPoseidon(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/poseidon_test.starknet_with_keccak.cairo") - require.NoError(t, err) - - _, _, _, output, err := runVm(compiledOutput) - require.NoError(t, err) - require.Contains(t, output, "Program output:\n 442682200349489646213731521593476982257703159825582578145778919623645026501\n 2233832504250924383748553933071188903279928981104663696710686541536735838182\n 2512222140811166287287541003826449032093371832913959128171347018667852712082\n") - require.Contains(t, output, "3016509350703874362933565866148509373957094754875411937434637891208784994231\n 3015199725895936530535660185611704199044060139852899280809302949374221328865\n 3062378460350040063467318871602229987911299744598148928378797834245039883769\n") - clean("./builtin_tests/") -} - -func TestECDSA(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/ecdsa_test.starknet_with_keccak.cairo") - require.NoError(t, err) - - _, _, _, _, err = runVm(compiledOutput) - require.NoError(t, err) - - clean("./builtin_tests/") -} - -func TestEcOp(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/ecop.starknet_with_keccak.cairo") - require.NoError(t, err) - - _, _, _, _, err = runVm(compiledOutput) - // todo(rodro): This test is failing due to the lack of hint processing. It should be address soon - require.Error(t, err) - - clean("./builtin_tests/") -} - -func TestKeccak(t *testing.T) { - compiledOutput, err := compileZeroCode("./builtin_tests/keccak_test.starknet_with_keccak.cairo") - require.NoError(t, err) - - _, _, _, output, err := runVm(compiledOutput) - require.NoError(t, err) - require.Contains(t, output, "Program output:\n 1304102964824333531548398680304964155037696012322029952943772\n 688749063493959345342507274897412933692859993314608487848187\n 986714560881445649520443980361539218531403996118322524237197\n 1184757872753521629808292433475729390634371625298664050186717\n 719230200744669084408849842242045083289669818920073250264351\n 1543031433416778513637578850638598357854418012971636697855068\n 63644822371671650271181212513090078620238279557402571802224\n 879446821229338092940381117330194802032344024906379963157761\n") - - clean("./builtin_tests/") -}