summaryrefslogtreecommitdiffstats
path: root/indexlib/tests/create-test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/tests/create-test.cpp')
-rw-r--r--indexlib/tests/create-test.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indexlib/tests/create-test.cpp b/indexlib/tests/create-test.cpp
new file mode 100644
index 000000000..beeb7d5f9
--- /dev/null
+++ b/indexlib/tests/create-test.cpp
@@ -0,0 +1,28 @@
+#include <boost/test/unit_test.hpp>
+#include "create.h"
+#include "index.h"
+
+using namespace ::boost::unit_test;
+
+namespace create_test {
+
+const char* fname = "create-test-delete-me/////";
+
+void cleanup() {
+ indexlib::remove( fname );
+}
+
+void simple() {
+ cleanup();
+ std::auto_ptr<indexlib::index> ptr = indexlib::create( fname );
+ BOOST_CHECK( ptr.get() );
+}
+
+test_suite* get_suite() {
+ test_suite* test = BOOST_TEST_SUITE( "Create tests" );
+ test->add( BOOST_TEST_CASE( &simple ) );
+ return test;
+}
+
+}
+