R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> has type "hello", while the right type at <unlabeled-symbol> has type true)",
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> has type "hello", while the right type at <unlabeled-symbol> has type "world")",
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Arg[3] has type number, while the right type at <unlabeled-symbol>.Arg[3] has type string)",
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Arg[2] has type number, while the right type at <unlabeled-symbol>.Arg[2] has type string)",
diffMessage);
}
TEST_CASE_FIXTURE(Fixture,"function_ret_normal")
{
// Old solver does not correctly infer function typepacks
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Ret[1] has type number, while the right type at <unlabeled-symbol>.Ret[1] has type string)",
diffMessage);
}
TEST_CASE_FIXTURE(Fixture,"function_arg_length")
{
// Old solver does not correctly infer function typepacks
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 2 or more arguments, while the right type at <unlabeled-symbol> takes 3 or more arguments)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 3 or more arguments, while the right type at <unlabeled-symbol> takes 2 or more arguments)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 0 or more arguments, while the right type at <unlabeled-symbol> takes 2 or more arguments)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 1 or more arguments, while the right type at <unlabeled-symbol> takes 0 or more arguments)",
diffMessage);
}
TEST_CASE_FIXTURE(Fixture,"function_ret_length")
{
// Old solver does not correctly infer function typepacks
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> returns 1 values, while the right type at <unlabeled-symbol> returns 2 values)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> returns 3 values, while the right type at <unlabeled-symbol> returns 2 values)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> returns 0 values, while the right type at <unlabeled-symbol> returns 1 values)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> returns 1 values, while the right type at <unlabeled-symbol> returns 0 values)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Arg[Variadic] has type number, while the right type at <unlabeled-symbol>.Arg[Variadic] has type string)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Arg[Variadic] has type number, while the right type at <unlabeled-symbol>.Arg[Variadic] has type any)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol>.Arg[Variadic] has type any, while the right type at <unlabeled-symbol>.Arg[Variadic] has type string)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 2 or more arguments, while the right type at <unlabeled-symbol> takes 2 arguments)",
INFO("Differ did not report type error, even though types are unequal");
CHECK(false);
}
diffMessage=diffRes.diffError->toString();
}
catch(constInternalCompilerError&e)
{
INFO(("InternalCompilerError: "+e.message));
CHECK(false);
}
CHECK_EQ(
R"(DiffError: these two types are not equal because the left type at <unlabeled-symbol> takes 2 arguments, while the right type at <unlabeled-symbol> takes 2 or more arguments)",