Rename //explorer/common to base (#3103)

Renaming per #3100
This commit is contained in:
Jon Ross-Perkins
2023-08-15 19:23:23 +00:00
committed by GitHub
parent a6ba7827cd
commit 357baaeef8
80 changed files with 194 additions and 194 deletions
+26
View File
@@ -0,0 +1,26 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include "explorer/base/error_builders.h"
#include <gtest/gtest.h>
#include "explorer/base/source_location.h"
#include "testing/util/test_raw_ostream.h"
namespace Carbon::Testing {
namespace {
TEST(ErrorBuildersTest, ProgramError) {
Error err = ProgramError(SourceLocation("x", 1, FileKind::Main)) << "test";
EXPECT_EQ(err.location(), "x:1");
EXPECT_EQ(err.message(), "test");
TestRawOstream out;
out << err;
EXPECT_EQ(out.TakeStr(), "x:1: test");
}
} // namespace
} // namespace Carbon::Testing