test/realpath.cpp
Go to the documentation of this file.
1 
6 /*****************************************************************************
7 ** Platform Check
8 *****************************************************************************/
9 
10 #include <ecl/filesystem/config.hpp>
11 #if defined(ECL_PRIVATE_HAS_POSIX_REALPATH)
12 
13 /*****************************************************************************
14 ** Includes
15 *****************************************************************************/
16 
17 //#include <iostream>
18 #include <string>
19 #include <gtest/gtest.h>
20 #include "../../include/ecl/filesystem/realpath.hpp"
21 
22 /*****************************************************************************
23 ** Using
24 *****************************************************************************/
25 
26 /*****************************************************************************
27 ** Tests
28 *****************************************************************************/
29 
30 TEST(FilesystemTests,realpath) {
31  std::string abs_path;
32  std::string rel_path = "./experiment.dslam";
33 
34  ecl::realpath(rel_path, abs_path);
35  // TODO : right now, we have no idea of where this will run. Once we have
36  // a `pwd` like function later, insert it here to derive the test properly.
37  //EXPECT_EQ(std::string("Foo"), abs_path);
38  std::cout << "Absolute path: " << abs_path << std::endl;
39  SUCCEED();
40 }
41 
42 #endif /* ECL_PRIVATE_HAS_POSIX_REALPATH */
43 
44 /*****************************************************************************
45 ** Main program
46 *****************************************************************************/
47 
48 int main(int argc, char **argv) {
49 
50  testing::InitGoogleTest(&argc,argv);
51  return RUN_ALL_TESTS();
52 }
53 
54 
int main(int argc, char **argv)
TEST(TypeTests, fundamentals)


ecl_filesystem
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:13