Add a test for the parse function when HAVE_MAT_JSON is disabled.
@@ -444,4 +444,16 @@ TEST_F(TransmitProfilesTests, load_Json_JsonNotEnabled_ReturnsFalse)
const std::string rule = R"([])";
ASSERT_FALSE(TransmitProfiles::load(rule));
}
+
+TEST_F(TransmitProfilesTests, parse_GoodJsonJsonNotEnabled_ReturnsZero)
+{
+ const std::string rule = R"([{
+ "name": "GoodRule",
+ "rules": [
+ { "netCost": "restricted", "timers": [ -1, -1, -1 ] }
+ ]
+}])";
+ ;
+ ASSERT_EQ(TransmitProfiles::parse(rule), size_t { 0 });
+}
#endif // HAVE_MAT_JSONHPP
\ No newline at end of file
