src/net/cert/internal/verify_name_match_unittest.cc
TEST_P(VerifyNameMatchNormalizationTest, CollapseWhitespace) {
  std::string normal;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), "unmangled", &normal));
  std::string whitespace;
  ASSERT_TRUE(
      LoadTestData("ascii", value_type(), "extra_whitespace", &whitespace));
  EXPECT_EQ(expected_result(),
            VerifyNameMatch(SequenceValueFromString(&normal),
                            SequenceValueFromString(&whitespace)));
  EXPECT_EQ(expected_result(),
            VerifyNameMatch(SequenceValueFromString(&whitespace),
                            SequenceValueFromString(&normal)));
}
// Verify matching folds whitespace (for the types which currently support
// normalization).
Verify matching folds whitespace (for the types which currently support
normalization).
Verify matching folds whitespace ( for the types which currently support normalization ) .
TEST_P(VerifyNameMatchNormalizationTest, CollapseWhitespace) {
  std::string normal;
  ASSERT_TRUE(LoadTestData("ascii", value_type(), "unmangled", &normal));
  std::string whitespace;
  ASSERT_TRUE(
      LoadTestData("ascii", value_type(), "extra_whitespace", &whitespace));
  EXPECT_EQ(expected_result(),
            VerifyNameMatch(SequenceValueFromString(&normal),
                            SequenceValueFromString(&whitespace)));
  EXPECT_EQ(expected_result(),
            VerifyNameMatch(SequenceValueFromString(&whitespace),
                            SequenceValueFromString(&normal)));
}
TEST_P ( VerifyNameMatchNormalizationTest , CollapseWhitespace ) { std :: string normal ; ASSERT_TRUE ( LoadTestData ( " " , value_type ( ) , " " , & normal ) ) ; std :: string whitespace ; ASSERT_TRUE ( LoadTestData ( " " , value_type ( ) , " " , & whitespace ) ) ; EXPECT_EQ ( expected_result ( ) , VerifyNameMatch ( SequenceValueFromString ( & normal ) , SequenceValueFromString ( & whitespace ) ) ) ; EXPECT_EQ ( expected_result ( ) , VerifyNameMatch ( SequenceValueFromString ( & whitespace ) , SequenceValueFromString ( & normal ) ) ) ; }
Verify matching folds whitespace (for the types which currently support
normalization).
Verify matching folds whitespace ( for the types which currently support normalization ) .