MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_CLASS_TEST

Function UNIT_CLASS_TEST

generator/generator_tests/feature_builder_test.cpp:25–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23using namespace tests;
24
25UNIT_CLASS_TEST(TestWithClassificator, FBuilder_ManyTypes)
26{
27 FeatureBuilder fb1;
28 FeatureBuilderParams params;
29
30 base::StringIL arr[] = {
31 {"building"},
32 {"place", "country"},
33 {"place", "state"},
34 /// @todo Can't realize is it deprecated or we forgot to add clear styles for it.
35 //{ "place", "county" },
36 {"place", "region"},
37 {"place", "city"},
38 {"place", "town"},
39 };
40 AddTypes(params, arr);
41
42 params.FinishAddingTypes();
43 params.SetHouseNumberAndHouseName("75", "Best House");
44 params.AddName("default", "Name");
45
46 fb1.SetParams(params);
47 fb1.SetCenter(m2::PointD(0, 0));
48
49 TEST(fb1.RemoveInvalidTypes(), ());
50 TEST(fb1.IsValid(), (fb1));
51
52 FeatureBuilder::Buffer buffer;
53 TEST(fb1.PreSerializeAndRemoveUselessNamesForIntermediate(), ());
54 fb1.SerializeForIntermediate(buffer);
55
56 FeatureBuilder fb2;
57 fb2.DeserializeFromIntermediate(buffer);
58
59 TEST(fb2.IsValid(), (fb2));
60 TEST_EQUAL(fb1, fb2, ());
61 TEST_EQUAL(fb2.GetTypesCount(), 6, ());
62}
63
64UNIT_CLASS_TEST(TestWithClassificator, FBuilder_LineTypes)
65{

Callers

nothing calls this directly

Calls 15

AddTypesFunction · 0.85
TESTFunction · 0.85
MakeOsmNodeFunction · 0.85
MakeOsmWayFunction · 0.85
MakeOsmRelationFunction · 0.85
RemoveUselessTypesFunction · 0.85
GetUpperScaleFunction · 0.85
FinishAddingTypesMethod · 0.80
RemoveInvalidTypesMethod · 0.80

Tested by

no test coverage detected