summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-05-06 19:01:56 +0000
committerRui Ueyama <ruiu@google.com>2014-05-06 19:01:56 +0000
commitb12dcb60955ce9993b4a2cb990a9c99fd54b686f (patch)
treec6104ad43c5a7cf880521e0f2aa692069e8acfe0
parentfd5c70d0ecccf58e98c5695fcaf30787957ff9f1 (diff)
downloadbcm5719-llvm-b12dcb60955ce9993b4a2cb990a9c99fd54b686f.tar.gz
bcm5719-llvm-b12dcb60955ce9993b4a2cb990a9c99fd54b686f.zip
s/My/Test/ as these classes are for tests.
llvm-svn: 208119
-rw-r--r--lld/unittests/DriverTests/InputGraphTest.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/lld/unittests/DriverTests/InputGraphTest.cpp b/lld/unittests/DriverTests/InputGraphTest.cpp
index 4c14553f003..c8453fcad76 100644
--- a/lld/unittests/DriverTests/InputGraphTest.cpp
+++ b/lld/unittests/DriverTests/InputGraphTest.cpp
@@ -22,21 +22,21 @@ using namespace lld;
namespace {
-class MyLinkingContext : public LinkingContext {
+class TestLinkingContext : public LinkingContext {
public:
Writer &writer() const override { llvm_unreachable("no writer!"); }
bool validateImpl(raw_ostream &) override { return true; }
};
-class MyFileNode : public SimpleFileNode {
+class TestFileNode : public SimpleFileNode {
public:
- MyFileNode(StringRef path) : SimpleFileNode(path) {}
+ TestFileNode(StringRef path) : SimpleFileNode(path) {}
void resetNextIndex() override { FileNode::resetNextIndex(); }
};
-class MyExpandFileNode : public SimpleFileNode {
+class TestExpandFileNode : public SimpleFileNode {
public:
- MyExpandFileNode(StringRef path) : SimpleFileNode(path) {}
+ TestExpandFileNode(StringRef path) : SimpleFileNode(path) {}
/// Returns true as we want to expand this file
bool shouldExpand() const override { return true; }
@@ -73,25 +73,26 @@ public:
}
protected:
- MyLinkingContext _ctx;
+ TestLinkingContext _ctx;
InputGraph *_graph;
};
} // end anonymous namespace
-static std::unique_ptr<MyFileNode> createFile1(StringRef name) {
+static std::unique_ptr<TestFileNode> createFile1(StringRef name) {
std::vector<std::unique_ptr<File>> files;
files.push_back(std::unique_ptr<SimpleFile>(new SimpleFile(name)));
- std::unique_ptr<MyFileNode> file(new MyFileNode("filenode"));
+ std::unique_ptr<TestFileNode> file(new TestFileNode("filenode"));
file->addFiles(std::move(files));
return file;
}
-static std::unique_ptr<MyFileNode> createFile2(StringRef name1, StringRef name2) {
+static std::unique_ptr<TestFileNode> createFile2(StringRef name1,
+ StringRef name2) {
std::vector<std::unique_ptr<File>> files;
files.push_back(std::unique_ptr<SimpleFile>(new SimpleFile(name1)));
files.push_back(std::unique_ptr<SimpleFile>(new SimpleFile(name2)));
- std::unique_ptr<MyFileNode> file(new MyFileNode("filenode"));
+ std::unique_ptr<TestFileNode> file(new TestFileNode("filenode"));
file->addFiles(std::move(files));
return file;
}
@@ -160,7 +161,8 @@ TEST_F(InputGraphTest, Normalize) {
std::vector<std::unique_ptr<File>> objfiles;
_graph->addInputElement(createFile2("file1", "file2"));
- std::unique_ptr<MyExpandFileNode> expandFile(new MyExpandFileNode("node"));
+ std::unique_ptr<TestExpandFileNode> expandFile(
+ new TestExpandFileNode("node"));
expandFile->addElement(createFile1("file3"));
expandFile->addElement(createFile1("file4"));
_graph->addInputElement(std::move(expandFile));
OpenPOWER on IntegriCloud