Convert all tests to single-file packages.
This commit is contained in:
parent
c08f101549
commit
cd3e756dd6
8 changed files with 115 additions and 10 deletions
30
tests/vibe.core.net.1452.d
Normal file
30
tests/vibe.core.net.1452.d
Normal file
|
@ -0,0 +1,30 @@
|
|||
/++ dub.sdl:
|
||||
name "test"
|
||||
description "Invalid memory operation on TCP connection leakage at shutdown"
|
||||
dependency "vibe-core" path="../../"
|
||||
+/
|
||||
module test;
|
||||
|
||||
import vibe.core.core;
|
||||
import vibe.core.net;
|
||||
import core.time : msecs;
|
||||
|
||||
class C {
|
||||
TCPConnection m_conn;
|
||||
|
||||
this()
|
||||
{
|
||||
m_conn = connectTCP("example.com", 443);
|
||||
}
|
||||
|
||||
~this()
|
||||
{
|
||||
m_conn.close();
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
auto c = new C;
|
||||
// let druntime collect c during shutdown
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue