12345678910111213141516171819202122 |
- #include <gtest/gtest.h>
- #include <json.hpp>
- //#define private public
- #include <ModuleMath.h>
- using namespace mdd;
- TEST(ModuleMath, INT_PLUS_Int){
- ModuleMath test = ModuleMath();
- test.update();
- EXPECT_EQ(test.getOutput(0)->getValue()["value"].get<int>(), 2);
- }
- TEST(ModuleMath, ARRAYINT_PLUS_ARRAYInt){
- ModuleMath test = ModuleMath();
- test.setInputDefaultValue(0)["value"] = {1,2,3,45};
- test.setInputDefaultValue(1)["value"] = {10,31,23,23};
- test.update();
- EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "{11,33,26,68}");
- }
|