gtest_links_unittest.cc 651 B

123456789101112131415161718192021222324
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/test/gtest_links.h"
  5. #include "base/test/gtest_util.h"
  6. #include "testing/gtest/include/gtest/gtest.h"
  7. namespace base {
  8. TEST(GtestLinksTest, AddInvalidLink) {
  9. EXPECT_DCHECK_DEATH(AddLinkToTestResult("unique_link", "invalid`"));
  10. }
  11. TEST(GtestLinksTest, AddInvalidName) {
  12. EXPECT_DCHECK_DEATH(AddLinkToTestResult("invalid-name", "http://google.com"));
  13. }
  14. TEST(GtestLinksTest, AddValidLink) {
  15. AddLinkToTestResult("name", "http://google.com");
  16. }
  17. } // namespace base