Lolly 1.4.28
Loading...
Searching...
No Matches
file_url_test.cpp
Go to the documentation of this file.
1/** \file url.cpp
2 * \copyright GPLv3
3 * \details Unitests for url.
4 * \author Darcy
5 * \date 2019-2023
6 */
7#include "a_lolly_test.hpp"
8#include "url.hpp"
9
10#if defined(OS_MINGW) || defined(OS_WIN)
11url win_c_windows= url_system ("C:/Windows");
12url win_c = url_system ("C:/");
13url system_root = url_system ("%SystemRoot%");
14url windir = url_system ("%windir%");
15
17
18TEST_CASE ("as_string on windows") {
19 string_eq (as_string (win_c), "C:\\");
20 string_eq (as_string (win_c_windows), "C:\\Windows");
21 string_eq (as_string (system_root), "%SystemRoot%");
22 string_eq (as_string (windir), "%windir%");
23}
24
26#else
29
31
32TEST_CASE ("as_string on nix") {
34 string_eq (as_string (unix_tmp), "/tmp");
35}
36
38#endif
The list class represents a linked list.
Definition list.hpp:48
Definition url.hpp:37
url unix_tmp
url unix_root
#define TEST_MEMORY_LEAK_INIT
#define TEST_MEMORY_LEAK_ALL
void string_eq(string left, string right)
TEST_CASE("test for operator+= and advance()")
string as_string(int16_t i)
Definition string.cpp:272
url url_system(string name)
Definition url.cpp:306