Aktualizr
C++ SOTA Client
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Functions
a
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Variables
Enumerations
Files
File List
File Members
All
Functions
Enumerations
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Pages
tests
leak_test.cc
1
#include <gtest/gtest.h>
2
3
/**
4
* A test case that leaks memory, to check that we can spot this in valgrind
5
*/
6
TEST(Leak, ThisTestLeaks) {
7
int
* temp =
new
int
[45];
8
int
temp2 = *temp++;
9
std::cout << temp2;
10
}
11
12
#ifndef __NO_MAIN__
13
int
main(
int
argc,
char
** argv) {
14
::testing::InitGoogleTest(&argc, argv);
15
return
RUN_ALL_TESTS();
16
}
17
#endif
Generated by
1.8.17