changeset 430:f746592d8301

unit testing
author jodogne
date Wed, 08 May 2013 15:16:13 +0200
parents 09b3c6265a94
children 16b52fb8d034
files OrthancServer/OrthancInitialization.cpp UnitTests/main.cpp
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancInitialization.cpp	Wed May 08 15:13:01 2013 +0200
+++ b/OrthancServer/OrthancInitialization.cpp	Wed May 08 15:16:13 2013 +0200
@@ -286,8 +286,6 @@
     boost::filesystem::path base(baseDirectory);
     boost::filesystem::path relative(relativePath);
 
-    return (base / relative).string();
-
     /**
        The following lines should be equivalent to this one: 
 
--- a/UnitTests/main.cpp	Wed May 08 15:13:01 2013 +0200
+++ b/UnitTests/main.cpp	Wed May 08 15:16:13 2013 +0200
@@ -338,7 +338,8 @@
 #if defined(__linux)
 TEST(OrthancInitialization, AbsoluteDirectory)
 {
-  ASSERT_EQ("/tmp/coucou", InterpretRelativePath("/tmp", "coucou"));
+  ASSERT_EQ("/tmp/hello", InterpretRelativePath("/tmp", "hello"));
+  ASSERT_EQ("/tmp", InterpretRelativePath("/tmp", "/tmp"));
 }
 #endif