works, needs cleanup
This commit is contained in:
@@ -26,13 +26,14 @@ run_test(Test) ->
|
||||
simple_compile_test_() ->
|
||||
[ {"Testing the " ++ ContractName ++ " contract with the " ++ atom_to_list(Backend) ++ " backend",
|
||||
fun() ->
|
||||
case compile(Backend, ContractName) of
|
||||
case compile(Backend, ContractName, [pp_assembler]) of
|
||||
#{byte_code := ByteCode,
|
||||
contract_source := _,
|
||||
type_info := _} when Backend == aevm ->
|
||||
?assertMatch(Code when is_binary(Code), ByteCode);
|
||||
#{fate_code := Code} when Backend == fate ->
|
||||
Code1 = aeb_fate_code:deserialize(aeb_fate_code:serialize(Code)),
|
||||
error(xd),
|
||||
?assertMatch({X, X}, {Code1, Code});
|
||||
ErrBin ->
|
||||
io:format("\n~s", [ErrBin]),
|
||||
|
||||
+11
-3
@@ -1,6 +1,14 @@
|
||||
// If you need a quick compiler test — this file is for your playground
|
||||
contract T =
|
||||
entrypoint f(x, y) = 3
|
||||
main contract IntegerAdderFactory =
|
||||
stateful payable entrypoint calculateSomething(x, t) =
|
||||
// let t = Chain.create(value = 5555) : T
|
||||
t.f(protected = true, gas = 999999999, value = 777777, 111, 222)
|
||||
// t.f()
|
||||
|
||||
/*
|
||||
contract IntegerAdder =
|
||||
entrypoint init() = unit
|
||||
entrypoint init() = ()
|
||||
entrypoint addIntegers(x, y) = x + y
|
||||
|
||||
contract IntegerAdderHolder =
|
||||
@@ -17,4 +25,4 @@ main contract EnterpriseContract =
|
||||
entrypoint calculateSomething(x) =
|
||||
let adder = IntegerAdderFactory.new()
|
||||
adder.addIntegers(x, 2137)
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user