MCPcopy Create free account
hub / github.com/OSGeo/PROJ / TEST

Function TEST

test/unit/test_operation.cpp:80–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78// ---------------------------------------------------------------------------
79
80TEST(operation, method) {
81
82 auto method = OperationMethod::create(
83 PropertyMap(), std::vector<OperationParameterNNPtr>{});
84 EXPECT_TRUE(method->isEquivalentTo(method.get()));
85 EXPECT_FALSE(method->isEquivalentTo(createUnrelatedObject().get()));
86 auto otherMethod = OperationMethod::create(
87 PropertyMap(),
88 std::vector<OperationParameterNNPtr>{OperationParameter::create(
89 PropertyMap().set(IdentifiedObject::NAME_KEY, "paramName"))});
90 EXPECT_TRUE(otherMethod->isEquivalentTo(otherMethod.get()));
91 EXPECT_FALSE(method->isEquivalentTo(otherMethod.get()));
92 auto otherMethod2 = OperationMethod::create(
93 PropertyMap(),
94 std::vector<OperationParameterNNPtr>{OperationParameter::create(
95 PropertyMap().set(IdentifiedObject::NAME_KEY, "paramName2"))});
96 EXPECT_FALSE(otherMethod->isEquivalentTo(otherMethod2.get()));
97 EXPECT_FALSE(otherMethod->isEquivalentTo(
98 otherMethod2.get(), IComparable::Criterion::EQUIVALENT));
99}
100
101// ---------------------------------------------------------------------------
102

Callers

nothing calls this directly

Calls 15

PropertyMapClass · 0.85
AngleClass · 0.85
replaceAllFunction · 0.85
ScaleClass · 0.85
LengthClass · 0.85
createPROJBasedFunction · 0.85
MeasureClass · 0.85
isEquivalentToMethod · 0.80
setMethod · 0.80
exportToWKTMethod · 0.80
sourceCRSMethod · 0.80

Tested by

no test coverage detected