Test: add more unit tests

This commit is contained in:
wmayer
2023-08-26 11:51:02 +02:00
committed by wwmayer
parent 423cc42ac8
commit d623e37e5e
19 changed files with 1826 additions and 10 deletions

View File

@@ -0,0 +1,15 @@
#include "gtest/gtest.h"
#include "App/PropertyLinks.h"
TEST(PropertyLink, TestSetValues)
{
App::PropertyLinkSubList prop;
std::vector<App::DocumentObject*> objs {nullptr, nullptr};
std::vector<const char*> subs {"Sub1", "Sub2"};
prop.setValues(objs, subs);
const auto& sub = prop.getSubValues();
EXPECT_EQ(sub.size(), 2);
EXPECT_EQ(sub[0], "Sub1");
EXPECT_EQ(sub[1], "Sub2");
}