src/modular/lib/modular_config/modular_config_unittest.cc
// Tests that ParseConfig return an error when passed a JSON string that doesn't match
// the Modular config schema.
Tests that ParseConfig return an error when passed a JSON string that doesn't match
the Modular config schema.
Tests that ParseConfig return an error when passed a JSON string that doesn ' t match the Modular config schema .
TEST_F(ModularConfigReaderTest, ParseConfigInvalidSchema) {
  static constexpr auto kConfigJson = R"({
    "basemgr": {
      "session_shells": {
        "this is valid JSON but not a valid modular config"
      }
    }
  })";
  auto config_result = modular::ParseConfig(kConfigJson);
  EXPECT_TRUE(config_result.is_error());
}
TEST_F ( ModularConfigReaderTest , ParseConfigInvalidSchema ) { static constexpr auto kConfigJson = R" ( {
    "basemgr": {
      "session_shells": {
        "this is valid JSON but not a valid modular config"
      }
    }
  } ) " ; auto config_result = modular :: ParseConfig ( kConfigJson ) ; EXPECT_TRUE ( config_result . is_error ( ) ) ; }
Tests that ParseConfig return an error when passed a JSON string that doesn't match
the Modular config schema.
Tests that ParseConfig return an error when passed a JSON string that doesn ' t match the Modular config schema .