summaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/tests/assert/asserter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/tests/assert/asserter.cpp')
-rw-r--r--staging_vespalib/src/tests/assert/asserter.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/staging_vespalib/src/tests/assert/asserter.cpp b/staging_vespalib/src/tests/assert/asserter.cpp
deleted file mode 100644
index 640464889c0..00000000000
--- a/staging_vespalib/src/tests/assert/asserter.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/vespalib/util/assert.h>
-#include <cassert>
-#include <cstdlib>
-#include <fstream>
-#include <string>
-
-int main(int argc, char *argv[]) {
- assert(argc == 3);
- const char * assertKey = argv[1];
- size_t assertCount = strtoul(argv[2], nullptr, 0);
- for (size_t i(0); i < assertCount; i++) {
- ASSERT_ONCE_OR_LOG(true, assertKey, 100);
- ASSERT_ONCE_OR_LOG(false, assertKey, 100);
- }
- std::string filename = vespalib::assert::getAssertLogFileName(assertKey);
- std::ifstream is(filename.c_str());
- assert(is);
- std::string line;
- std::getline(is, line);
- printf("%s\n", filename.c_str());
- assert(line.find(assertKey) != std::string::npos);
- assert(assertCount == vespalib::assert::getNumAsserts(assertKey));
- return 0;
-}