提交 b2e13f9c 编写于 作者: E Eric Blake

tests: fix reversed comparisons

Otherwise, a failed test gives misleading output.

* tests/commandtest.c (test13, test14, test16): Pass arguments in
correct order.
上级 855d900b
/* /*
* commandtest.c: Test the libCommand API * commandtest.c: Test the libCommand API
* *
* Copyright (C) 2010-2011 Red Hat, Inc. * Copyright (C) 2010-2012 Red Hat, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -481,7 +481,7 @@ static int test13(const void *unused ATTRIBUTE_UNUSED) ...@@ -481,7 +481,7 @@ static int test13(const void *unused ATTRIBUTE_UNUSED)
cmd = NULL; cmd = NULL;
if (!STREQ(outactual, outexpect)) { if (!STREQ(outactual, outexpect)) {
virtTestDifference(stderr, outactual, outexpect); virtTestDifference(stderr, outexpect, outactual);
goto cleanup; goto cleanup;
} }
...@@ -526,11 +526,11 @@ static int test14(const void *unused ATTRIBUTE_UNUSED) ...@@ -526,11 +526,11 @@ static int test14(const void *unused ATTRIBUTE_UNUSED)
cmd = NULL; cmd = NULL;
if (!STREQ(outactual, outexpect)) { if (!STREQ(outactual, outexpect)) {
virtTestDifference(stderr, outactual, outexpect); virtTestDifference(stderr, outexpect, outactual);
goto cleanup; goto cleanup;
} }
if (!STREQ(erractual, errexpect)) { if (!STREQ(erractual, errexpect)) {
virtTestDifference(stderr, erractual, errexpect); virtTestDifference(stderr, errexpect, erractual);
goto cleanup; goto cleanup;
} }
...@@ -604,7 +604,7 @@ static int test16(const void *unused ATTRIBUTE_UNUSED) ...@@ -604,7 +604,7 @@ static int test16(const void *unused ATTRIBUTE_UNUSED)
} }
if (!STREQ(outactual, outexpect)) { if (!STREQ(outactual, outexpect)) {
virtTestDifference(stderr, outactual, outexpect); virtTestDifference(stderr, outexpect, outactual);
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册