MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / TEST

Function TEST

pj_runtime/tests/data_processor_service_transform_test.cpp:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122};
123
124TEST(DataProcessorTransformTest, UpsertCreatesNamedTopic) {
125 Fixture fx;
126 fx.seed("speed", {-1.0, 2.0, -3.0});
127
128 const auto rec = fx.service.upsertTransform("pluginA", "negate", {"speed"}, {"speed/negated"}, kNegate, "{}");
129 ASSERT_TRUE(rec.has_value()) << rec.error();
130 EXPECT_EQ(rec->key, "pluginA/negate");
131 EXPECT_EQ(rec->owner_plugin, "pluginA");
132 EXPECT_EQ(rec->user_id, "negate");
133 EXPECT_EQ(rec->backend, "luau");
134 EXPECT_EQ(rec->dataset_id, fx.ds); // output dataset = the input topic's dataset
135 ASSERT_EQ(rec->output_topic_ids.size(), 1u);
136
137 const TopicId out = rec->output_topic_ids.front();
138 EXPECT_TRUE(fx.listed(out));
139 EXPECT_EQ(readValues(fx.engine, out), (std::vector<double>{1.0, -2.0, 3.0}));
140}
141
142TEST(DataProcessorTransformTest, UpsertReplacesExistingNode) {
143 Fixture fx;

Callers

nothing calls this directly

Calls 15

upsertTransformMethod · 0.80
listedMethod · 0.80
transformRecipesMethod · 0.80
removeTransformMethod · 0.80
seedMultiColumnMethod · 0.80
lockEngineMethod · 0.80
getTopicStorageMethod · 0.80
descriptorMethod · 0.80
transformIdsForPluginMethod · 0.80
restoreTransformMethod · 0.80
clearAllTransformsMethod · 0.80

Tested by

no test coverage detected