[llvm] r185232 - Replace UNIXy path with os-independent one in DebugIR unit test

Daniel Malea daniel.malea at intel.com
Fri Jun 28 15:17:58 PDT 2013


Author: dmalea
Date: Fri Jun 28 17:17:57 2013
New Revision: 185232

URL: http://llvm.org/viewvc/llvm-project?rev=185232&view=rev
Log:
Replace UNIXy path with os-independent one in DebugIR unit test
- should resolve windows buildbot failure


Modified:
    llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp

Modified: llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp?rev=185232&r1=185231&r2=185232&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp (original)
+++ llvm/trunk/unittests/Transforms/DebugIR/DebugIR.cpp Fri Jun 28 17:17:57 2013
@@ -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<DebugIR *>(llvm::createDebugIRPass()));
-  string Path;
-  D->runOnModule(*M, Path);
+  string Dir = "MadeUpDirectory";
+  string File = "empty_module.ll";
+  string Path(getPath(Dir, File));
+
+  M.reset(createEmptyModule(Path));
 
-  // verify DebugIR was able to correctly parse the file name from module ID
-  ASSERT_EQ(Path, name);
+  // constructing DebugIR with no args should not result in any file generated.
+  D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
+  D->runOnModule(*M);
 
   // verify DebugIR did not generate a file
   ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path;





More information about the llvm-commits mailing list