Lolly 1.4.27
Loading...
Searching...
No Matches
Macros | Functions
lolly_doctests.hpp File Reference
#include "doctest/doctest.h"
#include "lolly/data/string_u16.hpp"
#include "lolly/data/string_view.hpp"
#include "string.hpp"
#include "url.hpp"
Include dependency graph for lolly_doctests.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TM_CHECK_THROWS(statements)
 
#define TEST_MEMORY_LEAK_ALL    TEST_CASE ("test memory leak above") { CHECK_EQ (mem_used (), mem_lolly); }
 
#define TEST_MEMORY_LEAK_INIT
 
#define TEST_MEMORY_LEAK_RESET    TEST_CASE ("reset test of memory leak") { mem_lolly= mem_used (); }
 

Functions

void string_eq (string left, string right)
 
void string_neq (string left, string right)
 
void url_eq (url left, url right)
 
void url_neq (url left, url right)
 

Macro Definition Documentation

◆ TM_CHECK_THROWS

#define TM_CHECK_THROWS ( statements)
Value:
The list class represents a linked list.
Definition list.hpp:48

Definition at line 47 of file lolly_doctests.hpp.

47#define TM_CHECK_THROWS(statements) \
48 CHECK_THROWS (statements); \
49 handle_exceptions ();

◆ TEST_MEMORY_LEAK_ALL

#define TEST_MEMORY_LEAK_ALL    TEST_CASE ("test memory leak above") { CHECK_EQ (mem_used (), mem_lolly); }

Definition at line 51 of file lolly_doctests.hpp.

51#define TEST_MEMORY_LEAK_ALL \
52 TEST_CASE ("test memory leak above") { CHECK_EQ (mem_used (), mem_lolly); }

◆ TEST_MEMORY_LEAK_INIT

#define TEST_MEMORY_LEAK_INIT
Value:
int mem_lolly= 0; \
TEST_CASE ("read before test") { mem_lolly= mem_used (); }
int mem_used()

Definition at line 54 of file lolly_doctests.hpp.

54#define TEST_MEMORY_LEAK_INIT \
55 int mem_lolly= 0; \
56 TEST_CASE ("read before test") { mem_lolly= mem_used (); }

◆ TEST_MEMORY_LEAK_RESET

#define TEST_MEMORY_LEAK_RESET    TEST_CASE ("reset test of memory leak") { mem_lolly= mem_used (); }

Definition at line 58 of file lolly_doctests.hpp.

58#define TEST_MEMORY_LEAK_RESET \
59 TEST_CASE ("reset test of memory leak") { mem_lolly= mem_used (); }

Function Documentation

◆ string_eq()

void string_eq ( string left,
string right )
inline

Definition at line 14 of file lolly_doctests.hpp.

14 {
15 if (left != right) {
16 cout << "left : " << left << LF;
17 cout << "right: " << right << LF;
18 }
19 CHECK_EQ (left == right, true);
20}
@ LF
Definition basic.hpp:287
tm_ostream & cout

◆ string_neq()

void string_neq ( string left,
string right )
inline

Definition at line 23 of file lolly_doctests.hpp.

23 {
24 if (left == right) {
25 cout << "same: " << left << LF;
26 }
27 CHECK_EQ (left != right, true);
28}

◆ url_eq()

void url_eq ( url left,
url right )
inline

Definition at line 31 of file lolly_doctests.hpp.

31 {
32 if (left != right) {
33 cout << "left : " << left << LF;
34 cout << "right: " << right << LF;
35 }
36 CHECK_EQ (left == right, true);
37}

◆ url_neq()

void url_neq ( url left,
url right )
inline

Definition at line 40 of file lolly_doctests.hpp.

40 {
41 if (left == right) {
42 cout << "same: " << left << LF;
43 }
44 CHECK_EQ (left != right, true);
45}