Skip to content

Commit

Permalink
Add test for std::filesystem::path
Browse files Browse the repository at this point in the history
  • Loading branch information
devajithvs authored and jenkins committed Feb 16, 2024
1 parent 75b1314 commit aa6d492
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/Prompt/ValuePrinter/FileSystemPath.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// CLING - the C++ LLVM-based InterpreterG :)
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.

//------------------------------------------------------------------------------
// RUN: cat %s | %cling | FileCheck %s

#include <iostream>
#if __cplusplus >= 201703L
#include <filesystem>
#endif

#if __cplusplus >= 201703L
auto p = std::filesystem::path("/some/path/foo.cpp");
p
#else
// Hack to prevent failure if feature does not exist!
std::cout << "(std::filesystem::path &)";
std::cout << "/some/path/foo.cpp\n";
#endif
// CHECK: (std::filesystem::path &) /some/path/foo.cpp

0 comments on commit aa6d492

Please sign in to comment.