Skip to content

Commit 616bdee

Browse files
author
robertDurst
committed
update tests for previous addition of udt initializer in type checker
1 parent f51cf6e commit 616bdee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/tests.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,14 @@ TEST(SemanticTest, TypeCheckerUDTDec)
347347
"not exist.",
348348
"Udt attribute type of: udt for attribute: u and for udt: bool does "
349349
"not exist.",
350+
"Too few arguments in udt initialization.",
351+
"Received unknown attribute name of: a in constructor of udt of type: "
352+
"Foo.",
353+
"Too few arguments in udt initialization.",
354+
"Received intiializer variable of type: flt in constructor of udt of "
355+
"type: Foo when a variable for type: int was expected for attribute "
356+
"named: i.",
357+
"Too few arguments in udt initialization.",
350358
};
351359

352360
Parser* p = new Parser();
@@ -452,6 +460,7 @@ TEST(SemanticTest, TypeCheckerMethodAccess)
452460
TEST(SemanticTest, TypeCheckerAttributeAccess)
453461
{
454462
static const std::string expected[] = {
463+
"Too few arguments in udt initialization.",
455464
"Attribute: f does not exists for udt type: Foo.",
456465
"Expected the same types on each side of operation. Instead "
457466
"received: "

0 commit comments

Comments
 (0)