Skip to content
Snippets Groups Projects
Commit 9b25942d authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Add ASTNodeAffectationExpressionBuilder tests

parent 694639c5
No related branches found
No related tags found
1 merge request!37Feature/language
......@@ -28,7 +28,8 @@ ASTNodeAffectationExpressionBuilder::ASTNodeAffectationExpressionBuilder(ASTNode
break;
}
default: {
throw parse_error("undefined operand type for affectation", std::vector{n.children[0]->begin()});
throw parse_error("unexpected error: undefined operand type for affectation",
std::vector{n.children[1]->begin()});
}
}
};
......@@ -59,11 +60,12 @@ ASTNodeAffectationExpressionBuilder::ASTNodeAffectationExpressionBuilder(ASTNode
break;
}
default: {
throw parse_error("undefined operand type for affectation", std::vector{n.children[0]->begin()});
throw parse_error("unexpected error: undefined operand type for string affectation",
std::vector{n.children[1]->begin()});
}
}
} else {
throw parse_error("undefined operator type", std::vector{n.children[0]->begin()});
throw parse_error("unexpected error: undefined operator type", std::vector{n.children[0]->begin()});
}
};
......@@ -91,7 +93,7 @@ ASTNodeAffectationExpressionBuilder::ASTNodeAffectationExpressionBuilder(ASTNode
break;
}
default: {
throw parse_error("undefined value type for affectation", std::vector{n.begin()});
throw parse_error("unexpected error: undefined value type for affectation", std::vector{n.begin()});
}
}
};
......
......@@ -7,6 +7,7 @@ add_executable (unit_tests
test_ArrayUtils.cpp
test_ASTBuilder.cpp
test_ASTDotPrinter.cpp
test_ASTNodeAffectationExpressionBuilder.cpp
test_ASTNodeDataType.cpp
test_ASTNodeDataTypeBuilder.cpp
test_ASTNodeDataTypeChecker.cpp
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment