From 8bb9ec15c89da88c8e223f334296d81080cd829c Mon Sep 17 00:00:00 2001 From: Daniel Malea Date: Fri, 28 Jun 2013 22:17:57 +0000 Subject: Replace UNIXy path with os-independent one in DebugIR unit test - should resolve windows buildbot failure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185232 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Transforms/DebugIR/DebugIR.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'unittests/Transforms') diff --git a/unittests/Transforms/DebugIR/DebugIR.cpp b/unittests/Transforms/DebugIR/DebugIR.cpp index cf81e7a728..7d213fd056 100644 --- a/unittests/Transforms/DebugIR/DebugIR.cpp +++ b/unittests/Transforms/DebugIR/DebugIR.cpp @@ -96,14 +96,15 @@ protected: // Test empty named Module that is not supposed to be output to disk. TEST_F(TestDebugIR, EmptyNamedModuleNoWrite) { - string name = "/mock/path/to/empty_module.ll"; - M.reset(createEmptyModule(name)); - D.reset(static_cast(llvm::createDebugIRPass())); - string Path; - D->runOnModule(*M, Path); + string Dir = "MadeUpDirectory"; + string File = "empty_module.ll"; + string Path(getPath(Dir, File)); - // verify DebugIR was able to correctly parse the file name from module ID - ASSERT_EQ(Path, name); + M.reset(createEmptyModule(Path)); + + // constructing DebugIR with no args should not result in any file generated. + D.reset(static_cast(llvm::createDebugIRPass())); + D->runOnModule(*M); // verify DebugIR did not generate a file ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path; -- cgit v1.2.3