Skip to content

Commit

Permalink
Added rexs 1.5 model database version (#21)
Browse files Browse the repository at this point in the history
closes #21
  • Loading branch information
fuersten authored Mar 28, 2023
1 parent 7c7a1cd commit 270c3c8
Show file tree
Hide file tree
Showing 6 changed files with 11,226 additions and 4 deletions.
4 changes: 4 additions & 0 deletions include/rexsapi/Types.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ namespace rexsapi
if (type == "array_of_integer_arrays") {
return TValueType::ARRAY_OF_INTEGER_ARRAYS;
}
if (type == "date_time") {
// TODO(LCF): just to make the 1.5 version working
return TValueType::STRING;
}
throw TException{fmt::format("unknown value type '{}'", type)};
}

Expand Down
5,609 changes: 5,609 additions & 0 deletions models/rexs_model_1.5_de.xml

Large diffs are not rendered by default.

5,609 changes: 5,609 additions & 0 deletions models/rexs_model_1.5_en.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/database/FileResourceLoaderTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TEST_CASE("File resource loader test")
buffers.emplace_back(buffer);
});

CHECK(buffers.size() == 10);
CHECK(buffers.size() == 12);
std::for_each(buffers.begin(), buffers.end(), [](const auto& buf) {
checkBuffer(buf);
});
Expand Down
4 changes: 2 additions & 2 deletions test/database/ModelRegistryTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ TEST_CASE("Test rexs model registry")
SUBCASE("Get non existing model non-strict mode")
{
const auto& model = registry.getModel(rexsapi::TRexsVersion{"1.99"}, "de", false);
CHECK(model.getVersion() == rexsapi::TRexsVersion{"1.4"});
CHECK(model.getVersion() == rexsapi::TRexsVersion{"1.5"});
CHECK(model.getLanguage() == "de");
}

SUBCASE("Get non existing model non-strict mode with unknown language")
{
const auto& model = registry.getModel(rexsapi::TRexsVersion{"1.99"}, "es", false);
CHECK(model.getVersion() == rexsapi::TRexsVersion{"1.4"});
CHECK(model.getVersion() == rexsapi::TRexsVersion{"1.5"});
CHECK(model.getLanguage() == "en");
}
}
2 changes: 1 addition & 1 deletion test/database/XMLModelLoaderTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ TEST_CASE("XML database model loader test")
});

CHECK(result);
REQUIRE(models.size() == 10);
REQUIRE(models.size() == 12);
std::set<std::string, std::less<>> languages;
for (const auto& model : models) {
languages.insert(model.getLanguage());
Expand Down

0 comments on commit 270c3c8

Please sign in to comment.