MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / TEST_F

Function TEST_F

src/model/test/ThreeJSForwardTranslator_GTest.cpp:32–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30using namespace openstudio::model;
31
32TEST_F(ModelFixture, ThreeJSForwardTranslator_ParkUnder_Retail_Office_C2) {
33 ThreeJSForwardTranslator ft;
34 openstudio::path out;
35
36 osversion::VersionTranslator translator;
37 openstudio::path modelpath = resourcesPath() / toPath("model/ParkUnder_Retail_Office_C2.osm");
38 model::OptionalModel model = translator.loadModel(modelpath);
39 ThreeScene scene = ft.modelToThreeJS(model.get(), true);
40 EXPECT_EQ(0, ft.errors().size());
41 EXPECT_EQ(0, ft.warnings().size());
42 for (const auto& error : ft.errors()) {
43 EXPECT_TRUE(false) << "Error:" << error.logMessage();
44 }
45 for (const auto& warn : ft.warnings()) {
46 EXPECT_TRUE(false) << "Warning:" << warn.logMessage();
47 }
48 std::string json = scene.toJSON();
49 EXPECT_TRUE(ThreeScene::load(json));
50
51 out = resourcesPath() / toPath("model/MParkUnder_Retail_Office_C2.json");
52 openstudio::filesystem::ofstream file1(out);
53 ASSERT_TRUE(file1.is_open());
54 file1 << json;
55 file1.close();
56}
57
58TEST_F(ModelFixture, ThreeJSForwardTranslator_7_7_Windows_Complete) {
59 ThreeJSForwardTranslator ft;

Callers

nothing calls this directly

Calls 15

exampleModelFunction · 0.85
modelToThreeJSMethod · 0.80
logMessageMethod · 0.80
beginMethod · 0.80
modelFromThreeJSMethod · 0.80
cbeginMethod · 0.80
cendMethod · 0.80
materialsMethod · 0.80
valueDescriptionMethod · 0.80
nameStringMethod · 0.80
toPathFunction · 0.50

Tested by

no test coverage detected