summaryrefslogtreecommitdiff
path: root/chromium/base/test/gtest_links_unittest.cc
blob: 1810ae8de6a78df0c348c070a71ad9a6cb9cb20c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/test/gtest_links.h"

#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace base {

TEST(GtestLinksTest, AddInvalidLink) {
  EXPECT_DCHECK_DEATH(AddLinkToTestResult("unique_link", "invalid`"));
}

TEST(GtestLinksTest, AddInvalidName) {
  EXPECT_DCHECK_DEATH(AddLinkToTestResult("invalid-name", "http://google.com"));
}

TEST(GtestLinksTest, AddValidLink) {
  AddLinkToTestResult("name", "http://google.com");
}

}  // namespace base