]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
unit: fix bug in teddy model unit tests
authorJustin Viiret <justin.viiret@intel.com>
Fri, 6 May 2016 01:32:36 +0000 (11:32 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 18 May 2016 06:27:54 +0000 (16:27 +1000)
unit/internal/fdr.cpp

index 3aada867fe8bbf6428fd5cf9c2612630317d70b7..d10c25f0cb61658985f7cd2be995b0ebd96aec98 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Intel Corporation
+ * Copyright (c) 2015-2016, Intel Corporation
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
@@ -59,8 +59,8 @@ using namespace ue2;
 #define CHECK_WITH_TEDDY_OK_TO_FAIL(fdr, hint)                                 \
     {                                                                          \
         auto descr = getTeddyDescription(hint);                                \
-        if (descr && fdr != nullptr) {                                         \
-            return;                                                            \
+        if (descr && fdr == nullptr) {                                         \
+            return; /* cannot build Teddy for this set of literals */          \
         } else {                                                               \
             ASSERT_TRUE(fdr != nullptr);                                       \
         }                                                                      \