OSDN Git Service

[core] : .gitignore を変更
authorcaprice <caprice@users.sourceforge.jp>
Sun, 23 Jun 2013 16:11:54 +0000 (01:11 +0900)
committercaprice <caprice@users.sourceforge.jp>
Sun, 23 Jun 2013 16:14:07 +0000 (01:14 +0900)
.gitignore
core/test/query.cpp
core/test/test.cpp

index c225b50..9894322 100644 (file)
@@ -6,6 +6,8 @@
 
 # IDE settings
 *.xcodeproj    # Xcode
+/*/*.xcodeproj/
+/*/*.xcodeproj/*.pbxproj
 *.cbp          # code::blocks
 *.vcproj       # Visual C++
 *.vcxproj      # Visual C++
index 6118f62..0bf4773 100644 (file)
@@ -1,14 +1,38 @@
-//
-//  query.cpp
-//  core
-//
-//  Created by 沼野 正太郎 on 2013/06/22.
-//  Copyright (c) 2013年 沼野 正太郎. All rights reserved.
-//
+#ifndef GIKOMONA_CORE_TEST_QUERY_HPP_INCLUDED
+#define GIKOMONA_CORE_TEST_QUERY_HPP_INCLUDED
 
-#ifndef core_query_cpp
-#define core_query_cpp
+#include <type_traits>
 
+#include <boost/test/test_unit.hpp>
 
+#include "../include/query.hpp"
 
-#endif
+BOOST_AUTO_TEST_SUITE(CORE)
+BOOST_AUTO_TEST_SUITE(query)
+
+namespace gm_core = monazilla::GikoMona::core;
+
+BOOST_AUTO_TEST_CASE(type_concept) {
+    BOOST_REQUIRE_EQUAL(std::is_trivially_copyable<gm_core::query>::value);
+}
+
+BOOST_AUTO_TEST_CASE(selecting) {
+    BOOST_CHECK_MESSAGE(
+        false,
+        gm_core::query().define()
+            .select(gm_core::all_columnes, "test")
+            .dump()
+    );
+    BOOST_CHECK_MESSAGE(
+        false,
+        gm_core::query().define()
+            .select({"name", "birthday", "mail"}, "test")
+            .dump()
+    );
+}
+
+
+BOOST_AUTO_TEST_SUITE_END // query
+BOOST_AUTO_TEST_SUITE_END // CORE
+
+#endif // GIKOMONA_CORE_TEST_QUERY_HPP_INCLUDED
index d6e1fc9..28a08b6 100644 (file)
@@ -1,9 +1,4 @@
-//
-//  test-core.cpp
-//  core
-//
-//  Created by 沼野 正太郎 on 2013/06/22.
-//  Copyright (c) 2013年 沼野 正太郎. All rights reserved.
-//
+#define BOOST_TEST_MODULE my_mod
+#include <boost/test/unit_test.hpp>
+
 
-#include <stdio.h>