Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added a.out
Binary file not shown.
Binary file added output
Binary file not shown.
98 changes: 98 additions & 0 deletions testsuite/ContrTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,3 +1009,101 @@ BOOST_AUTO_TEST_CASE(support_succ_common_jit) {
BOOST_AUTO_TEST_SUITE_END() // accounting_tests

BOOST_AUTO_TEST_SUITE_END() // contr_exec

BOOST_AUTO_TEST_SUITE(uncurry1)

ContractTest Uncurry1Tests = {
"uncurry1.ll",
{{"uncurry1_dummy", "uncurry.message_dummy.json",
"empty_init.json", "uncurry1.contrinfo.json", "uncurry1.state_00.json",
"uncurry1.state_01.json", "uncurry1.output_1.json",
"blockchain_default.json"},
{"uncurry1_dummy2", "uncurry.message_dummy2.json",
"empty_init.json", "uncurry1.contrinfo.json", "uncurry1.state_00.json",
"uncurry1.state_02.json", "uncurry1.output_2.json",
"blockchain_default.json"}
}};

BOOST_AUTO_TEST_CASE(unique_jits) {
testMessages(Uncurry1Tests, false /* CommonJIT */);
}

BOOST_AUTO_TEST_CASE(common_jit) {
testMessages(Uncurry1Tests, true /* CommonJIT */);
}

BOOST_AUTO_TEST_SUITE_END()


BOOST_AUTO_TEST_SUITE(uncurry2)

ContractTest Uncurry2Tests = {
"uncurry2.ll",
{{"uncurry2_dummy", "uncurry.message_dummy.json",
"empty_init.json", "uncurry2.contrinfo.json", "uncurry.state_00.json",
"uncurry2.state_01.json", "uncurry2.output_1.json",
"blockchain_default.json"}
}};

BOOST_AUTO_TEST_CASE(unique_jits) {
testMessages(Uncurry2Tests, false /* CommonJIT */);
}

BOOST_AUTO_TEST_CASE(common_jit) {
testMessages(Uncurry2Tests, true /* CommonJIT */);
}

BOOST_AUTO_TEST_SUITE_END()

BOOST_AUTO_TEST_SUITE(uncurry3)

ContractTest Uncurry3Tests = {
"uncurry3.ll",
{
{"uncurry3_dummy1", "uncurry.message_dummy1.json",
"empty_init.json", "uncurry3.contrinfo.json", "uncurry.state_00.json",
"uncurry2.state_01.json", "uncurry3.output_1.json",
"blockchain_default.json"},
{"uncurry3_dummy2", "uncurry.message_dummy2.json",
"empty_init.json", "uncurry3.contrinfo.json", "uncurry.state_00.json",
"uncurry3.state_02.json", "uncurry3.output_2.json",
"blockchain_default.json"},
{"uncurry3_dummy2", "uncurry.message_dummy3.json",
"empty_init.json", "uncurry3.contrinfo.json", "uncurry.state_00.json",
"uncurry3.state_03.json", "uncurry3.output_3.json",
"blockchain_default.json"}
}};

BOOST_AUTO_TEST_CASE(unique_jits) {
testMessages(Uncurry3Tests, false /* CommonJIT */);
}

BOOST_AUTO_TEST_CASE(common_jit) {
testMessages(Uncurry3Tests, true /* CommonJIT */);
}

BOOST_AUTO_TEST_SUITE_END()


BOOST_AUTO_TEST_SUITE(uncurry4)

ContractTest Uncurry4Tests = {
"uncurry4.ll",
{
{"uncurry3_dummy", "uncurry.message_dummy.json",
"empty_init.json", "uncurry4.contrinfo.json", "uncurry.state_00.json",
"uncurry4.state_01.json", "uncurry4.output_1.json",
"blockchain_default.json"}
}};

BOOST_AUTO_TEST_CASE(unique_jits) {
testMessages(Uncurry4Tests, false /* CommonJIT */);
}

BOOST_AUTO_TEST_CASE(common_jit) {
testMessages(Uncurry4Tests, true /* CommonJIT */);
}

BOOST_AUTO_TEST_SUITE_END()


1 change: 1 addition & 0 deletions testsuite/ExprExecTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ BOOST_AUTO_TEST_CASE(builtin_isqrt) { testExecExpr("builtin-isqrt"); }
BOOST_AUTO_TEST_CASE(builtin_pow) { testExecExpr("builtin-pow"); }
BOOST_AUTO_TEST_CASE(map_to_int) { testExecExpr("map_to_list"); }
BOOST_AUTO_TEST_CASE(map_to_int2) { testExecExpr("map_to_list2"); }
BOOST_AUTO_TEST_CASE(uncurry_simple) { testExecExpr("uncurry_simple"); }

BOOST_AUTO_TEST_SUITE_END()

Expand Down
4 changes: 2 additions & 2 deletions testsuite/contr/accept.dbg.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
; gas_remaining: 4002000
; ModuleID = 'Accept'
source_filename = "Accept"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-darwin19.6.0"

%"$TyDescrTy_PrimTyp_4" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
4 changes: 2 additions & 2 deletions testsuite/contr/accept.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
; gas_remaining: 4002000
; ModuleID = 'Accept'
source_filename = "Accept"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-darwin19.6.0"

%"$TyDescrTy_PrimTyp_4" = type { i32, i32 }
%_TyDescrTy_Typ = type { i32, i8* }
Expand Down
10 changes: 5 additions & 5 deletions testsuite/contr/accounting_tests.contrinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"Read only field, consider making it a contract parameter: test_string_2",
"start_location": {
"file":
"../../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"line": 83,
"column": 9
},
Expand All @@ -119,7 +119,7 @@
"Read only field, consider making it a contract parameter: test_string_1",
"start_location": {
"file":
"../../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"line": 76,
"column": 9
},
Expand All @@ -131,7 +131,7 @@
"Read only field, consider making it a contract parameter: outgoing_amount",
"start_location": {
"file":
"../../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"line": 45,
"column": 13
},
Expand All @@ -143,7 +143,7 @@
"Read only field, consider making it a contract parameter: max_outgoing_msgs",
"start_location": {
"file":
"../../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"line": 46,
"column": 15
},
Expand All @@ -154,7 +154,7 @@
"warning_message": "Unused load statement to: s1",
"start_location": {
"file":
"../../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"../scilla-compiler//tests/codegen/contr/accounting_tests.scilla",
"line": 152,
"column": 3
},
Expand Down
Loading