brintos

brintos / llvm-project-archived public Read only

0
0
Text · 848 B · 4e2e3cb Raw
35 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// <filesystem>12 13// path operator/(path const&, path const&);14 15#include <filesystem>16#include <type_traits>17#include <cassert>18 19#include "test_macros.h"20namespace fs = std::filesystem;21 22// This is mainly tested via the member append functions.23int main(int, char**) {24  using namespace fs;25  path p1("abc");26  path p2("def");27  path p3 = p1 / p2;28  assert(p3 == "abc/def");29 30  path p4 = p1 / "def";31  assert(p4 == "abc/def");32 33  return 0;34}35