summaryrefslogtreecommitdiff
path: root/tests/unit/unit1606.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2017-04-30 10:54:26 +0200
committerDan Fandrich <dan@coneharvesters.com>2017-04-30 10:55:20 +0200
commit8089dcfc5d4b34b15cee1f1cc9b3124c0279d41b (patch)
treeea2d07b42ff6e3ceb6632de553dd4d36638796c9 /tests/unit/unit1606.c
parent65c6caacaee87f2b09aa03e5eed1bcbd9e356f68 (diff)
downloadgnurl-8089dcfc5d4b34b15cee1f1cc9b3124c0279d41b.tar.gz
gnurl-8089dcfc5d4b34b15cee1f1cc9b3124c0279d41b.tar.bz2
gnurl-8089dcfc5d4b34b15cee1f1cc9b3124c0279d41b.zip
tests: fixed OOM handling of unit tests to abort test
It's dangerous to continue to run the test when a memory alloc fails.
Diffstat (limited to 'tests/unit/unit1606.c')
-rw-r--r--tests/unit/unit1606.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit/unit1606.c b/tests/unit/unit1606.c
index fdc0ec381..7acba0325 100644
--- a/tests/unit/unit1606.c
+++ b/tests/unit/unit1606.c
@@ -69,6 +69,7 @@ static int runawhile(struct Curl_easy *easy,
UNITTEST_START
{
struct Curl_easy *easy = curl_easy_init();
+ abort_unless(easy, "out of memory");
fail_unless(runawhile(easy, 41, 41, 40, 0) == 41,
"wrong low speed timeout");