MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / test

Function test

src/common/classes/misc/string_test.cpp:68–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66#endif
67
68void test()
69{
70 {
71 string a;
72 validate(a, "");
73 a = lbl;
74 string b = a;
75 validate(b, lbl);
76 string f = "0123456789";
77 validate(f, lbl);
78 string g("0123456789", 5);
79 validate(g, "01234");
80 string h(5, '7');
81 validate(h, "77777");
82#ifdef FULL_FIRE
83 string i('7');
84 validate(i, "7");
85#endif
86 string j(&lbl[3], &lbl[5]);
87 validate(j, "34");
88 }
89
90 {
91 string a = lbl;
92 string b;
93 b = a;
94 validate(b, lbl);
95 b = lbl;
96 validate(b, lbl);
97 a = 'X';
98 validate(a, "X");
99
100 a = b;
101 for (string::iterator x = b.begin(); x < b.end(); x++)
102 *x = 'u';
103 validate(a, lbl);
104 validate(b, "uuuuuuuuuu");
105
106 char y[20], *z = y;
107 const string c = a;
108 for (string::const_iterator x1 = c.begin(); x1 < c.end(); x1++)
109 *z++ = *x1;
110 *z = 0;
111 b = y;
112 validate(b, lbl);
113 }
114
115#ifdef FULL_FIRE
116 {
117 const string a = lbl;
118 string b = a.at(5);
119 validate(b, "5");
120 }
121
122 {
123 string a = lbl;
124 string b = a.at(5);
125 validate(b, "5");

Callers 1

mainFunction · 0.70

Calls 15

fcloseFunction · 0.85
LoadFromFileMethod · 0.80
ltrimMethod · 0.80
rtrimMethod · 0.80
alltrimMethod · 0.80
lowerMethod · 0.80
upperMethod · 0.80
validateFunction · 0.50
checkFunction · 0.50
fopenFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected