From 41ae78ea3a931018cf2be58fb9eaa98bfeaf2db6 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 19 Jul 2022 20:15:44 -0700 Subject: Use has_value instead of hasValue (NFC) --- clang/unittests/Basic/SarifTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/unittests') diff --git a/clang/unittests/Basic/SarifTest.cpp b/clang/unittests/Basic/SarifTest.cpp index 05221c8..328496a 100644 --- a/clang/unittests/Basic/SarifTest.cpp +++ b/clang/unittests/Basic/SarifTest.cpp @@ -117,9 +117,9 @@ TEST_F(SarifDocumentWriterTest, canCreateDocumentWithOneRun) { Runs->begin()->getAsObject()->getObject("tool")->getObject("driver"); ASSERT_THAT(driver, testing::NotNull()); - ASSERT_TRUE(driver->getString("name").hasValue()); - ASSERT_TRUE(driver->getString("fullName").hasValue()); - ASSERT_TRUE(driver->getString("language").hasValue()); + ASSERT_TRUE(driver->getString("name").has_value()); + ASSERT_TRUE(driver->getString("fullName").has_value()); + ASSERT_TRUE(driver->getString("language").has_value()); EXPECT_EQ(driver->getString("name").getValue(), ShortName); EXPECT_EQ(driver->getString("fullName").getValue(), LongName); @@ -186,8 +186,8 @@ TEST_F(SarifDocumentWriterTest, addingResultWithValidRuleAndRunIsOk) { const llvm::json::Array *Artifacts = TheRun->getArray("artifacts"); // The tool is as expected - ASSERT_TRUE(Driver->getString("name").hasValue()); - ASSERT_TRUE(Driver->getString("fullName").hasValue()); + ASSERT_TRUE(Driver->getString("name").has_value()); + ASSERT_TRUE(Driver->getString("fullName").has_value()); EXPECT_EQ(Driver->getString("name").getValue(), "sarif test"); EXPECT_EQ(Driver->getString("fullName").getValue(), "sarif test runner"); -- cgit v1.1