Change assertion order in ASSERT_CALLBACK 10/76510/1
authorKyungwook Tak <k.tak@samsung.com>
Fri, 24 Jun 2016 06:06:14 +0000 (15:06 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Fri, 24 Jun 2016 06:42:40 +0000 (15:42 +0900)
Not to misunderstand callback counts mismatch.
Order it on importance.

Change-Id: I75c5756bf40a03a01f1bcb4c964837653fba834c
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
test/test-api-content-screening-async.cpp

index 23d15e7..c91769a 100644 (file)
                        actual.cv.wait(l);                                                          \
                        l.unlock();                                                                 \
                }                                                                               \
-               if (scan >= 0)                                                                  \
-                       ASSERT_IF_MSG(actual.scannedCnt, scan, "scanned count mismatch.");          \
-               if (detect >= 0)                                                                \
-                       ASSERT_IF_MSG(actual.detectedCnt, detect, "detected count mismatch.");      \
                if (complete >= 0)                                                              \
-                       ASSERT_IF_MSG(actual.completedCnt, complete, "completed count mismatch.");  \
+                       ASSERT_IF_MSG(actual.completedCnt, complete,                                \
+                                                 "completed count mismatch! "                                  \
+                                                 "Async isn't successfully completed!");                       \
                if (cancel >= 0)                                                                \
                        ASSERT_IF_MSG(actual.cancelledCnt, cancel, "cancelled count mismatch.");    \
                if (error >= 0)                                                                 \
                        ASSERT_IF_MSG(actual.errorCnt, error, "error count mismatch.");             \
+               if (detect >= 0)                                                                \
+                       ASSERT_IF_MSG(actual.detectedCnt, detect, "detected count mismatch.");      \
+               if (scan >= 0)                                                                  \
+                       ASSERT_IF_MSG(actual.scannedCnt, scan, "scanned count mismatch.");          \
                break;                                                                          \
        } while (false)