]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added test to runTestMode
authorPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:29:15 +0000 (17:29 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Tue, 20 Jun 2017 00:29:15 +0000 (17:29 -0700)
tests/decodecorpus.c

index 14d3f2358f9d6617d66bb72fe6c1827f73699282..8e2cefb4b8abe8df1c809c2b9a3a7e37b19f1ec6 100644 (file)
@@ -1386,6 +1386,14 @@ static int runTestMode(U32 seed, unsigned numFiles, unsigned const testDurationS
                 return 1;
             }
         }
+        {
+            size_t const dictSize = RAND(&seed);
+            size_t const r = testDecodeWithDict(seed, dictSize);
+            if (ZSTD_isError(r)) {
+                DISPLAY("Error in dictionary mode on test seed %u: %s\n", seed+fnum, ZSTD_getErrorName(r));
+                return 1;
+            }
+        }
     }
 
     DISPLAY("\r%u tests completed: ", fnum);