summaryrefslogtreecommitdiff
path: root/test/core/model
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/model')
-rw-r--r--test/core/model/TypesystemTest.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/core/model/TypesystemTest.cpp b/test/core/model/TypesystemTest.cpp
index 29ab5ec..24487e1 100644
--- a/test/core/model/TypesystemTest.cpp
+++ b/test/core/model/TypesystemTest.cpp
@@ -497,14 +497,18 @@ TEST(StructType, createValidated)
{
logger.reset();
- Rooted<StructType> structType{StructType::createValidated(
- mgr, "struct", nullptr, nullptr,
- NodeVector<Attribute>{
- new Attribute{mgr, "d", stringType, "attr1default"},
- new Attribute{mgr, "b", stringType},
- new Attribute{mgr, "a", intType, 3},
- new Attribute{mgr, "a", intType}},
- logger)};
+ try {
+ Rooted<StructType> structType{StructType::createValidated(
+ mgr, "struct", nullptr, nullptr,
+ NodeVector<Attribute>{
+ new Attribute{mgr, "d", stringType, "attr1default"},
+ new Attribute{mgr, "b", stringType},
+ new Attribute{mgr, "a", intType, 3},
+ new Attribute{mgr, "a", intType}},
+ logger)};
+ } catch (LoggableException ex) {
+ logger.log(ex);
+ }
ASSERT_EQ(Severity::ERROR, logger.getMaxEncounteredSeverity());
}