#include #include #include #include #include #include #include TestSuite(BasicCall); Test(BasicCall, SimpleCall) { std::cout << "----- FunCall -----"; ast::PrettyPrinter print(std::cout); ast::Exp* test = parse::parse("let " " function test(a : int, b : string) : int = " " a " " in " " test(1, \"2M, 22H->H, f.L, RS, RC, 55M, 632146M\") " " end \n"); cr_assert_not_null(test); print(test); cr_assert_eq(1, 1); } TestSuite(RealisticCall); Test(RealisticCall, Call_WExprs) { ast::PrettyPrinter print(std::cout); // If someone get this and sends me a video proof, you have my utmost respect (the sequence in itself is not that hard tbh) ast::Exp* test = parse::parse("let " " function test(a : int, b : string) : int = " " a " " in " " test(1 + 2 + c + inexistant, \"2M, 22H->H, f.L, RS, RC, 55M, 632146M\")" " end \n"); cr_assert_not_null(test); print(test); cr_assert_eq(1, 1); }