#include "cetlib/split_path.h"
#include <cassert>
Go to the source code of this file.
Definition at line 82 of file split_path_test.cc.
void test_leading_colon()
void test_trailing_colon()
void test_single_entry_path()
void test_adjacent_colons()
void test_adjacent_colons |
( |
| ) |
|
Definition at line 27 of file split_path_test.cc.
29 vector<string> results;
32 assert(results.size() == 3);
33 assert(results[0] ==
"A");
34 assert(results[1] ==
"");
35 assert(results[2] ==
"B");
Definition at line 9 of file split_path_test.cc.
11 vector<string> results;
13 assert(results.empty());
void test_leading_colon |
( |
| ) |
|
Definition at line 39 of file split_path_test.cc.
41 vector<string> results;
44 assert(results.size() == 2);
45 assert(results[0].
empty());
46 assert(results[1] ==
"BOO");
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
void test_single_entry_path |
( |
| ) |
|
Definition at line 17 of file split_path_test.cc.
19 vector<string> results;
20 string sole_entry(
"ABC_D/EFG/H");
22 assert(results.size() == 1);
23 assert(results[0] == sole_entry);
void test_trailing_colon |
( |
| ) |
|
Definition at line 50 of file split_path_test.cc.
52 vector<string> results;
55 assert(results.size() == 2);
56 assert(results[0] ==
"A");
57 assert(results[1].
empty());
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
void test_typical_use |
( |
| ) |
|
Definition at line 61 of file split_path_test.cc.
63 vector<string> results;
64 vector<string> path_elements;
65 path_elements.push_back(
"/p/gcc/v4_5_1/Linux64/lib64");
66 path_elements.push_back(
"/p/gcc/v4_5_1/Linux64/lib");
67 path_elements.push_back(
"/p/root/v5_26_00d/lib");
68 path_elements.push_back(
"/p/cmake/v2_6_4/.");
69 path_elements.push_back(
"/p/cppunit/v1_12_1/slf5.x86_64.a1/lib");
70 string path = path_elements[0];
71 for (
size_t i = 1; i < path_elements.size(); ++i) {
73 path += path_elements[i];
78 assert(results == path_elements);