mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 16:30:29 +00:00
add test
This commit is contained in:
parent
5e0de0d75d
commit
43c05503d2
1 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,8 @@
|
||||||
// #include <string>
|
// #include <string>
|
||||||
// #define ctl std
|
// #define ctl std
|
||||||
|
|
||||||
|
static int g = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
@ -114,6 +116,13 @@ main()
|
||||||
return 24;
|
return 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
struct A { int* p = &g; A() {++*p; } };
|
||||||
|
ctl::optional<A> x;
|
||||||
|
if (g != 0)
|
||||||
|
return 25;
|
||||||
|
}
|
||||||
|
|
||||||
CheckForMemoryLeaks();
|
CheckForMemoryLeaks();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue