[Groonga-commit] groonga/grnxx at 5c9c6ec [master] Rename lib/grnxx/time/* to lib/grnxx/*.

アーカイブの一覧に戻る

susumu.yata null+****@clear*****
Fri May 24 20:09:55 JST 2013


susumu.yata	2013-05-24 20:09:55 +0900 (Fri, 24 May 2013)

  New Revision: 5c9c6ec8b987eb94e6909e5b37c408d59a61ffbe
  https://github.com/groonga/grnxx/commit/5c9c6ec8b987eb94e6909e5b37c408d59a61ffbe

  Message:
    Rename lib/grnxx/time/* to lib/grnxx/*.

  Removed files:
    lib/grnxx/time/Makefile.am
  Modified files:
    configure.ac
    lib/grnxx/Makefile.am
    lib/grnxx/io/file-posix.cpp
    lib/grnxx/io/file-windows.cpp
    lib/grnxx/io/file.hpp
    lib/grnxx/io/file_info.hpp
    lib/grnxx/logger.cpp
    lib/grnxx/map/bytes_store.cpp
    lib/grnxx/map/bytes_store.hpp
    lib/grnxx/mutex.cpp
    lib/grnxx/mutex.hpp
    lib/grnxx/recycler.cpp
    lib/grnxx/recycler.hpp
    lib/grnxx/storage.hpp
    lib/grnxx/storage/node_header.hpp
    lib/grnxx/storage/storage_impl.hpp
    lib/grnxx/thread.cpp
    lib/grnxx/thread.hpp
    test/test_alpha_double_array.cpp
    test/test_alpha_map.cpp
    test/test_db_blob_vector.cpp
    test/test_db_vector.cpp
    test/test_duration.cpp
    test/test_intrinsic.cpp
    test/test_io.cpp
    test/test_map.cpp
    test/test_mutex.cpp
    test/test_recycler.cpp
    test/test_storage.cpp
    test/test_string.cpp
    test/test_string_builder.cpp
    test/test_string_format.cpp
    test/test_thread.cpp
    test/test_time.cpp
  Renamed files:
    lib/grnxx/broken_down_time.cpp
      (from lib/grnxx/time/broken_down_time.cpp)
    lib/grnxx/broken_down_time.hpp
      (from lib/grnxx/time/broken_down_time.hpp)
    lib/grnxx/duration.cpp
      (from lib/grnxx/time/duration.cpp)
    lib/grnxx/duration.hpp
      (from lib/grnxx/time/duration.hpp)
    lib/grnxx/periodic_clock.cpp
      (from lib/grnxx/time/periodic_clock.cpp)
    lib/grnxx/periodic_clock.hpp
      (from lib/grnxx/time/periodic_clock.hpp)
    lib/grnxx/stopwatch.cpp
      (from lib/grnxx/time/stopwatch.cpp)
    lib/grnxx/stopwatch.hpp
      (from lib/grnxx/time/stopwatch.hpp)
    lib/grnxx/system_clock.cpp
      (from lib/grnxx/time/system_clock.cpp)
    lib/grnxx/system_clock.hpp
      (from lib/grnxx/time/system_clock.hpp)
    lib/grnxx/time.cpp
      (from lib/grnxx/time/time.cpp)
    lib/grnxx/time.hpp
      (from lib/grnxx/time/time.hpp)

  Modified: configure.ac (+0 -1)
===================================================================
--- configure.ac    2013-05-24 17:21:34 +0900 (9399c19)
+++ configure.ac    2013-05-24 20:09:55 +0900 (3f7efad)
@@ -68,7 +68,6 @@ AC_CONFIG_FILES([Makefile
                  lib/grnxx/io/Makefile
                  lib/grnxx/map/Makefile
                  lib/grnxx/storage/Makefile
-                 lib/grnxx/time/Makefile
                  src/Makefile
                  test/Makefile])
 AC_OUTPUT

  Modified: lib/grnxx/Makefile.am (+15 -5)
===================================================================
--- lib/grnxx/Makefile.am    2013-05-24 17:21:34 +0900 (c397ef9)
+++ lib/grnxx/Makefile.am    2013-05-24 20:09:55 +0900 (c266667)
@@ -5,8 +5,7 @@ SUBDIRS =				\
 	db				\
 	io				\
 	map				\
-	storage				\
-	time
+	storage
 
 lib_LTLIBRARIES = libgrnxx.la
 
@@ -17,15 +16,16 @@ libgrnxx_la_LIBADD =			\
 	db/libgrnxx_db.la		\
 	io/libgrnxx_io.la		\
 	map/libgrnxx_map.la		\
-	storage/libgrnxx_storage.la	\
-	time/libgrnxx_time.la
+	storage/libgrnxx_storage.la
 
 libgrnxx_la_LDFLAGS = @AM_LTLDFLAGS@
 
 libgrnxx_la_SOURCES =			\
 	backtrace.cpp			\
+	broken_down_time.cpp		\
 	bytes.cpp			\
 	charset.cpp			\
+	duration.cpp			\
 	error.cpp			\
 	geo_point.cpp			\
 	grnxx.cpp			\
@@ -33,20 +33,26 @@ libgrnxx_la_SOURCES =			\
 	map.cpp				\
 	mutex.cpp			\
 	os.cpp				\
+	periodic_clock.cpp		\
 	recycler.cpp			\
 	slice.cpp			\
+	stopwatch.cpp			\
 	storage.cpp			\
 	string.cpp			\
 	string_builder.cpp		\
-	thread.cpp
+	system_clock.cpp		\
+	thread.cpp			\
+	time.cpp
 
 libgrnxx_includedir = ${includedir}/grnxx
 libgrnxx_include_HEADERS =		\
 	array.hpp			\
 	backtrace.hpp			\
 	basic.hpp			\
+	broken_down_time.hpp		\
 	bytes.hpp			\
 	charset.hpp			\
+	duration.hpp			\
 	error.hpp			\
 	exception.hpp			\
 	features.hpp			\
@@ -59,13 +65,17 @@ libgrnxx_include_HEADERS =		\
 	map.hpp				\
 	mutex.hpp			\
 	os.hpp				\
+	periodic_clock.hpp		\
 	recycler.hpp			\
 	slice.hpp			\
+	stopwatch.hpp			\
 	storage.hpp			\
 	string.hpp			\
 	string_builder.hpp		\
 	string_format.hpp		\
+	system_clock.hpp		\
 	thread.hpp			\
+	time.hpp			\
 	traits.hpp			\
 	types.hpp			\
 	version.h

  Renamed: lib/grnxx/broken_down_time.cpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/broken_down_time.cpp    2013-05-24 17:21:34 +0900 (4f7d8e5)
+++ lib/grnxx/broken_down_time.cpp    2013-05-24 20:09:55 +0900 (0ec4d33)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/broken_down_time.hpp"
+#include "grnxx/broken_down_time.hpp"
 
 #include "grnxx/string_builder.hpp"
 #include "grnxx/string_format.hpp"

  Renamed: lib/grnxx/broken_down_time.hpp (+0 -0) 100%
===================================================================

  Renamed: lib/grnxx/duration.cpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/duration.cpp    2013-05-24 17:21:34 +0900 (438f741)
+++ lib/grnxx/duration.cpp    2013-05-24 20:09:55 +0900 (01bc6be)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/duration.hpp"
+#include "grnxx/duration.hpp"
 
 #include "grnxx/string_builder.hpp"
 #include "grnxx/string_format.hpp"

  Renamed: lib/grnxx/duration.hpp (+0 -0) 100%
===================================================================

  Modified: lib/grnxx/io/file-posix.cpp (+1 -1)
===================================================================
--- lib/grnxx/io/file-posix.cpp    2013-05-24 17:21:34 +0900 (7ecfe99)
+++ lib/grnxx/io/file-posix.cpp    2013-05-24 20:09:55 +0900 (118fef2)
@@ -31,9 +31,9 @@
 #include "grnxx/exception.hpp"
 #include "grnxx/io/path.hpp"
 #include "grnxx/logger.hpp"
+#include "grnxx/stopwatch.hpp"
 #include "grnxx/string_builder.hpp"
 #include "grnxx/thread.hpp"
-#include "grnxx/time/stopwatch.hpp"
 
 namespace grnxx {
 namespace io {

  Modified: lib/grnxx/io/file-windows.cpp (+1 -1)
===================================================================
--- lib/grnxx/io/file-windows.cpp    2013-05-24 17:21:34 +0900 (1005829)
+++ lib/grnxx/io/file-windows.cpp    2013-05-24 20:09:55 +0900 (6578c2c)
@@ -27,9 +27,9 @@
 #include "grnxx/exception.hpp"
 #include "grnxx/io/path.hpp"
 #include "grnxx/logger.hpp"
+#include "grnxx/stopwatch.hpp"
 #include "grnxx/string_builder.hpp"
 #include "grnxx/thread.hpp"
-#include "grnxx/time/stopwatch.hpp"
 
 namespace grnxx {
 namespace io {

  Modified: lib/grnxx/io/file.hpp (+1 -1)
===================================================================
--- lib/grnxx/io/file.hpp    2013-05-24 17:21:34 +0900 (068c05c)
+++ lib/grnxx/io/file.hpp    2013-05-24 20:09:55 +0900 (9bd0ec9)
@@ -20,9 +20,9 @@
 
 #include <iosfwd>
 
+#include "grnxx/duration.hpp"
 #include "grnxx/flags_impl.hpp"
 #include "grnxx/string.hpp"
-#include "grnxx/time/duration.hpp"
 
 namespace grnxx {
 namespace io {

  Modified: lib/grnxx/io/file_info.hpp (+1 -1)
===================================================================
--- lib/grnxx/io/file_info.hpp    2013-05-24 17:21:34 +0900 (86d7d28)
+++ lib/grnxx/io/file_info.hpp    2013-05-24 20:09:55 +0900 (1cb740a)
@@ -18,7 +18,7 @@
 #ifndef GRNXX_IO_FILE_INFO_HPP
 #define GRNXX_IO_FILE_INFO_HPP
 
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/logger.cpp (+1 -1)
===================================================================
--- lib/grnxx/logger.cpp    2013-05-24 17:21:34 +0900 (c666f94)
+++ lib/grnxx/logger.cpp    2013-05-24 20:09:55 +0900 (0bc4e60)
@@ -23,7 +23,7 @@
 
 #include "grnxx/backtrace.hpp"
 #include "grnxx/lock.hpp"
-#include "grnxx/time/system_clock.hpp"
+#include "grnxx/system_clock.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/map/bytes_store.cpp (+2 -2)
===================================================================
--- lib/grnxx/map/bytes_store.cpp    2013-05-24 17:21:34 +0900 (07d4e54)
+++ lib/grnxx/map/bytes_store.cpp    2013-05-24 20:09:55 +0900 (03abbbb)
@@ -22,10 +22,10 @@
 #include <new>
 
 #include "grnxx/logger.hpp"
+#include "grnxx/periodic_clock.hpp"
 #include "grnxx/storage.hpp"
 #include "grnxx/string_builder.hpp"
-#include "grnxx/time/periodic_clock.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 namespace map {

  Modified: lib/grnxx/map/bytes_store.hpp (+1 -1)
===================================================================
--- lib/grnxx/map/bytes_store.hpp    2013-05-24 17:21:34 +0900 (b4bf86f)
+++ lib/grnxx/map/bytes_store.hpp    2013-05-24 20:09:55 +0900 (57f93c2)
@@ -22,7 +22,7 @@
 
 #include "grnxx/array.hpp"
 #include "grnxx/bytes.hpp"
-#include "grnxx/time/duration.hpp"
+#include "grnxx/duration.hpp"
 #include "grnxx/traits.hpp"
 #include "grnxx/types.hpp"
 

  Modified: lib/grnxx/mutex.cpp (+1 -1)
===================================================================
--- lib/grnxx/mutex.cpp    2013-05-24 17:21:34 +0900 (34e2342)
+++ lib/grnxx/mutex.cpp    2013-05-24 20:09:55 +0900 (8b2ae14)
@@ -19,7 +19,7 @@
 
 #include "grnxx/string_builder.hpp"
 #include "grnxx/thread.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/mutex.hpp (+1 -1)
===================================================================
--- lib/grnxx/mutex.hpp    2013-05-24 17:21:34 +0900 (976d55d)
+++ lib/grnxx/mutex.hpp    2013-05-24 20:09:55 +0900 (e26d51c)
@@ -23,7 +23,7 @@
 #include <utility>
 
 #include "grnxx/intrinsic.hpp"
-#include "grnxx/time/duration.hpp"
+#include "grnxx/duration.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Renamed: lib/grnxx/periodic_clock.cpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/periodic_clock.cpp    2013-05-24 17:21:34 +0900 (50fde30)
+++ lib/grnxx/periodic_clock.cpp    2013-05-24 20:09:55 +0900 (bf5e228)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/periodic_clock.hpp"
+#include "grnxx/periodic_clock.hpp"
 
 #include "grnxx/thread.hpp"
 #include "grnxx/lock.hpp"

  Renamed: lib/grnxx/periodic_clock.hpp (+2 -2) 94%
===================================================================
--- lib/grnxx/time/periodic_clock.hpp    2013-05-24 17:21:34 +0900 (abbee68)
+++ lib/grnxx/periodic_clock.hpp    2013-05-24 20:09:55 +0900 (9c28aa8)
@@ -20,8 +20,8 @@
 
 #include "grnxx/features.hpp"
 
-#include "grnxx/time/system_clock.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/system_clock.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/recycler.cpp (+1 -1)
===================================================================
--- lib/grnxx/recycler.cpp    2013-05-24 17:21:34 +0900 (26b813e)
+++ lib/grnxx/recycler.cpp    2013-05-24 20:09:55 +0900 (fa3d119)
@@ -18,7 +18,7 @@
 #include "grnxx/recycler.hpp"
 
 #include "grnxx/string_builder.hpp"
-#include "grnxx/time/system_clock.hpp"
+#include "grnxx/system_clock.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/recycler.hpp (+1 -1)
===================================================================
--- lib/grnxx/recycler.hpp    2013-05-24 17:21:34 +0900 (d7777bf)
+++ lib/grnxx/recycler.hpp    2013-05-24 20:09:55 +0900 (10c2832)
@@ -18,7 +18,7 @@
 #ifndef GRNXX_RECYCLER_HPP
 #define GRNXX_RECYCLER_HPP
 
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 

  Renamed: lib/grnxx/stopwatch.cpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/stopwatch.cpp    2013-05-24 17:21:34 +0900 (e07a81c)
+++ lib/grnxx/stopwatch.cpp    2013-05-24 20:09:55 +0900 (db8927a)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 #include <chrono>
 

  Renamed: lib/grnxx/stopwatch.hpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/stopwatch.hpp    2013-05-24 17:21:34 +0900 (2f00dfe)
+++ lib/grnxx/stopwatch.hpp    2013-05-24 20:09:55 +0900 (4bc571f)
@@ -20,7 +20,7 @@
 
 #include "grnxx/features.hpp"
 
-#include "grnxx/time/duration.hpp"
+#include "grnxx/duration.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/storage.hpp (+2 -2)
===================================================================
--- lib/grnxx/storage.hpp    2013-05-24 17:21:34 +0900 (4dded33)
+++ lib/grnxx/storage.hpp    2013-05-24 20:09:55 +0900 (7dd2ad6)
@@ -20,9 +20,9 @@
 
 #include "grnxx/features.hpp"
 
+#include "grnxx/duration.hpp"
 #include "grnxx/flags_impl.hpp"
-#include "grnxx/time/duration.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: lib/grnxx/storage/node_header.hpp (+1 -1)
===================================================================
--- lib/grnxx/storage/node_header.hpp    2013-05-24 17:21:34 +0900 (cbfe11c)
+++ lib/grnxx/storage/node_header.hpp    2013-05-24 20:09:55 +0900 (90d3e0f)
@@ -21,7 +21,7 @@
 #include "grnxx/features.hpp"
 
 #include "grnxx/storage.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Modified: lib/grnxx/storage/storage_impl.hpp (+3 -3)
===================================================================
--- lib/grnxx/storage/storage_impl.hpp    2013-05-24 17:21:34 +0900 (64470f0)
+++ lib/grnxx/storage/storage_impl.hpp    2013-05-24 20:09:55 +0900 (b385e40)
@@ -22,11 +22,11 @@
 
 #include <memory>
 
+#include "grnxx/duration.hpp"
 #include "grnxx/mutex.hpp"
+#include "grnxx/periodic_clock.hpp"
 #include "grnxx/storage.hpp"
-#include "grnxx/time/duration.hpp"
-#include "grnxx/time/periodic_clock.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 namespace storage {

  Renamed: lib/grnxx/system_clock.cpp (+1 -1) 96%
===================================================================
--- lib/grnxx/time/system_clock.cpp    2013-05-24 17:21:34 +0900 (79b4dc7)
+++ lib/grnxx/system_clock.cpp    2013-05-24 20:09:55 +0900 (89995c1)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/system_clock.hpp"
+#include "grnxx/system_clock.hpp"
 
 #include <chrono>
 

  Renamed: lib/grnxx/system_clock.hpp (+1 -1) 97%
===================================================================
--- lib/grnxx/time/system_clock.hpp    2013-05-24 17:21:34 +0900 (88add5e)
+++ lib/grnxx/system_clock.hpp    2013-05-24 20:09:55 +0900 (7051ac2)
@@ -20,7 +20,7 @@
 
 #include "grnxx/features.hpp"
 
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 

  Modified: lib/grnxx/thread.cpp (+1 -1)
===================================================================
--- lib/grnxx/thread.cpp    2013-05-24 17:21:34 +0900 (8cb4d23)
+++ lib/grnxx/thread.cpp    2013-05-24 20:09:55 +0900 (e656509)
@@ -42,7 +42,7 @@
 
 #include "grnxx/error.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/system_clock.hpp"
+#include "grnxx/system_clock.hpp"
 
 namespace grnxx {
 namespace {

  Modified: lib/grnxx/thread.hpp (+2 -2)
===================================================================
--- lib/grnxx/thread.hpp    2013-05-24 17:21:34 +0900 (069fa12)
+++ lib/grnxx/thread.hpp    2013-05-24 20:09:55 +0900 (1c419f0)
@@ -22,8 +22,8 @@
 
 #include <functional>
 
-#include "grnxx/time/duration.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/duration.hpp"
+#include "grnxx/time.hpp"
 
 namespace grnxx {
 

  Renamed: lib/grnxx/time.cpp (+1 -1) 99%
===================================================================
--- lib/grnxx/time/time.cpp    2013-05-24 17:21:34 +0900 (24d4d62)
+++ lib/grnxx/time.cpp    2013-05-24 20:09:55 +0900 (1f9e0b3)
@@ -15,7 +15,7 @@
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 #include <ctime>
 

  Renamed: lib/grnxx/time.hpp (+2 -2) 97%
===================================================================
--- lib/grnxx/time/time.hpp    2013-05-24 17:21:34 +0900 (0695f4d)
+++ lib/grnxx/time.hpp    2013-05-24 20:09:55 +0900 (c7a32c0)
@@ -20,8 +20,8 @@
 
 #include "grnxx/features.hpp"
 
-#include "grnxx/time/broken_down_time.hpp"
-#include "grnxx/time/duration.hpp"
+#include "grnxx/broken_down_time.hpp"
+#include "grnxx/duration.hpp"
 #include "grnxx/types.hpp"
 
 namespace grnxx {

  Deleted: lib/grnxx/time/Makefile.am (+0 -20) 100644
===================================================================
--- lib/grnxx/time/Makefile.am    2013-05-24 17:21:34 +0900 (edeb3ac)
+++ /dev/null
@@ -1,20 +0,0 @@
-noinst_LTLIBRARIES = libgrnxx_time.la
-
-libgrnxx_time_la_LDFLAGS = @AM_LTLDFLAGS@
-
-libgrnxx_time_la_SOURCES =	\
-	broken_down_time.cpp	\
-	duration.cpp		\
-	periodic_clock.cpp	\
-	stopwatch.cpp		\
-	system_clock.cpp	\
-	time.cpp
-
-libgrnxx_time_includedir = ${includedir}/grnxx/time
-libgrnxx_time_include_HEADERS =	\
-	broken_down_time.hpp	\
-	duration.hpp		\
-	periodic_clock.hpp	\
-	stopwatch.hpp		\
-	system_clock.hpp	\
-	time.hpp

  Modified: test/test_alpha_double_array.cpp (+1 -1)
===================================================================
--- test/test_alpha_double_array.cpp    2013-05-24 17:21:34 +0900 (01ea1c3)
+++ test/test_alpha_double_array.cpp    2013-05-24 20:09:55 +0900 (8d096a4)
@@ -23,7 +23,7 @@
 
 #include "grnxx/alpha/double_array.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 void test_basics() {
   grnxx::io::Pool pool;

  Modified: test/test_alpha_map.cpp (+1 -1)
===================================================================
--- test/test_alpha_map.cpp    2013-05-24 17:21:34 +0900 (cd36c3c)
+++ test/test_alpha_map.cpp    2013-05-24 20:09:55 +0900 (c3fcfc4)
@@ -25,7 +25,7 @@
 #include "grnxx/alpha/map.hpp"
 #include "grnxx/geo_point.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 template <typename T>
 bool isNaN(T) {

  Modified: test/test_db_blob_vector.cpp (+1 -1)
===================================================================
--- test/test_db_blob_vector.cpp    2013-05-24 17:21:34 +0900 (159b489)
+++ test/test_db_blob_vector.cpp    2013-05-24 20:09:55 +0900 (08e5f8e)
@@ -22,7 +22,7 @@
 
 #include "grnxx/db/blob_vector.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 void test_basics() {
   grnxx::io::Pool::unlink_if_exists("temp.grn");

  Modified: test/test_db_vector.cpp (+1 -1)
===================================================================
--- test/test_db_vector.cpp    2013-05-24 17:21:34 +0900 (dc06b45)
+++ test/test_db_vector.cpp    2013-05-24 20:09:55 +0900 (3d6a77e)
@@ -22,7 +22,7 @@
 
 #include "grnxx/db/vector.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 struct Point {
   double x;

  Modified: test/test_duration.cpp (+1 -25)
===================================================================
--- test/test_duration.cpp    2013-05-24 17:21:34 +0900 (16a6fd8)
+++ test/test_duration.cpp    2013-05-24 20:09:55 +0900 (c9db420)
@@ -19,7 +19,7 @@
 #include <sstream>
 
 #include "grnxx/logger.hpp"
-#include "grnxx/time/duration.hpp"
+#include "grnxx/duration.hpp"
 
 int main() {
   grnxx::Logger::set_flags(grnxx::LOGGER_WITH_ALL |
@@ -89,29 +89,5 @@ int main() {
   assert(grnxx::Duration(456) >= grnxx::Duration(456));
   assert(grnxx::Duration(456) >= grnxx::Duration(123));
 
-//  std::stringstream stream;
-//  stream << grnxx::Duration(123456789);
-//  assert(stream.str() == "123.456789");
-
-//  stream.str("");
-//  stream << grnxx::Duration::seconds(123);
-//  assert(stream.str() == "123");
-
-//  stream.str("");
-//  stream << (grnxx::Duration::seconds(456) + grnxx::Duration(789));
-//  assert(stream.str() == "456.000789");
-
-//  stream.str("");
-//  stream << grnxx::Duration(-123456789);
-//  assert(stream.str() == "-123.456789");
-
-//  stream.str("");
-//  stream << grnxx::Duration::seconds(-123);
-//  assert(stream.str() == "-123");
-
-//  stream.str("");
-//  stream << -(grnxx::Duration::seconds(456) + grnxx::Duration(789));
-//  assert(stream.str() == "-456.000789");
-
   return 0;
 }

  Modified: test/test_intrinsic.cpp (+1 -1)
===================================================================
--- test/test_intrinsic.cpp    2013-05-24 17:21:34 +0900 (19c04b2)
+++ test/test_intrinsic.cpp    2013-05-24 20:09:55 +0900 (3f5f2e2)
@@ -19,7 +19,7 @@
 
 #include "grnxx/intrinsic.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 void test_basics() {
   assert(grnxx::bit_scan_reverse(std::uint8_t(100)) == 6);

  Modified: test/test_io.cpp (+1 -1)
===================================================================
--- test/test_io.cpp    2013-05-24 17:21:34 +0900 (184ecdb)
+++ test/test_io.cpp    2013-05-24 20:09:55 +0900 (dba63eb)
@@ -27,7 +27,7 @@
 #include "grnxx/io/pool.hpp"
 #include "grnxx/io/view.hpp"
 #include "grnxx/logger.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 namespace {
 

  Modified: test/test_map.cpp (+49 -4)
===================================================================
--- test/test_map.cpp    2013-05-24 17:21:34 +0900 (4aed69b)
+++ test/test_map.cpp    2013-05-24 20:09:55 +0900 (6c08e8f)
@@ -30,8 +30,8 @@
 #include "grnxx/map.hpp"
 #include "grnxx/map/bytes_store.hpp"
 #include "grnxx/map/helper.hpp"
+#include "grnxx/periodic_clock.hpp"
 #include "grnxx/storage.hpp"
-#include "grnxx/time/periodic_clock.hpp"
 
 namespace {
 
@@ -74,7 +74,7 @@ T generate_random_key() {
   const T *key = reinterpret_cast<const T *>(&random_value);
   return grnxx::map::Helper<T>::normalize(*key);
 }
-// TODO: Generate a random key and it is valid until the next call.
+// Generate a random key and it is valid until the next call.
 template <>
 grnxx::Bytes generate_random_key() {
   static uint8_t buf[MAX_KEY_SIZE];
@@ -96,7 +96,7 @@ void generate_random_keys(std::vector<T> *keys, std::uint64_t num_keys) {
   *keys = std::vector<T>(keyset.begin(), keyset.end());
   std::random_shuffle(keys->begin(), keys->end(), RandomNumberGenerator());
 }
-// TODO: Generate random keys and those are valid until the next call.
+// Generate random keys and those are valid until the next call.
 template <>
 void generate_random_keys(std::vector<grnxx::Bytes> *keys,
                           std::uint64_t num_keys) {
@@ -586,6 +586,49 @@ void test_map_truncate(grnxx::MapType map_type) {
   }
 }
 
+//template <typename T>
+//void test_map_key_id(grnxx::MapType map_type) {
+//  std::unique_ptr<grnxx::Storage> storage(grnxx::Storage::create(nullptr));
+//  std::unique_ptr<grnxx::Map<T>> map(
+//      grnxx::Map<T>::create(map_type, storage.get(),
+//                            grnxx::STORAGE_ROOT_NODE_ID));
+//  assert(map);
+//  const std::int64_t min = 10;
+//  const std::int64_t max = 100;
+
+//  map->key_id() > min;
+//  map->key_id() >= min;
+//  map->key_id() < max;
+//  map->key_id() <= max;
+
+//  min < map->key_id();
+//  min <= map->key_id();
+//  max > map->key_id();
+//  max >= map->key_id();
+
+//  (map->key_id() > min) && (map->key_id() < max);
+//  (map->key_id() > min) && (map->key_id() <= max);
+//  (map->key_id() >= min) && (map->key_id() < max);
+//  (map->key_id() >= min) && (map->key_id() <= max);
+
+//  (map->key_id() < max) && (map->key_id() > min);
+//  (map->key_id() <= max) && (map->key_id() > min);
+//  (map->key_id() < max) && (map->key_id() >= min);
+//  (map->key_id() <= max) && (map->key_id() >= min);
+//}
+
+//template <typename T>
+//void test_map_key(grnxx::MapType map_type) {
+//  std::unique_ptr<grnxx::Storage> storage(grnxx::Storage::create(nullptr));
+//  std::unique_ptr<grnxx::Map<T>> map(
+//      grnxx::Map<T>::create(map_type, storage.get(),
+//                            grnxx::STORAGE_ROOT_NODE_ID));
+//  assert(map);
+//  T key = generate_random_key<T>();
+
+//  map->key() > key;
+//}
+
 template <typename T>
 void test_map_create_cursor(grnxx::MapType map_type) {
   std::unique_ptr<grnxx::Storage> storage(grnxx::Storage::create(nullptr));
@@ -633,6 +676,8 @@ void test_map(grnxx::MapType map_type) {
   test_map_replace<T>(map_type);
   test_map_find_longest_prefix_match<T>(map_type);
   test_map_truncate<T>(map_type);
+//  test_map_key_id<T>(map_type);
+//  test_map_key<T>(map_type);
   test_map_create_cursor<T>(map_type);
   test_map_create_scanner<T>(map_type);
 }
@@ -684,7 +729,7 @@ int main() {
   grnxx::PeriodicClock clock;
 
   test_bytes_store();
-//  test_map();
+  test_map();
 
   return 0;
 }

  Modified: test/test_mutex.cpp (+1 -1)
===================================================================
--- test/test_mutex.cpp    2013-05-24 17:21:34 +0900 (77e02c3)
+++ test/test_mutex.cpp    2013-05-24 20:09:55 +0900 (bf63a88)
@@ -20,7 +20,7 @@
 #include "grnxx/lock.hpp"
 #include "grnxx/logger.hpp"
 #include "grnxx/mutex.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 int main() {
   grnxx::Logger::set_flags(grnxx::LOGGER_WITH_ALL |

  Modified: test/test_recycler.cpp (+1 -1)
===================================================================
--- test/test_recycler.cpp    2013-05-24 17:21:34 +0900 (a533723)
+++ test/test_recycler.cpp    2013-05-24 20:09:55 +0900 (f8b00e5)
@@ -19,7 +19,7 @@
 
 #include "grnxx/logger.hpp"
 #include "grnxx/recycler.hpp"
-#include "grnxx/time/stopwatch.hpp"
+#include "grnxx/stopwatch.hpp"
 
 void test() {
   const grnxx::Duration FROZEN_DURATION = grnxx::Duration::minutes(10);

  Modified: test/test_storage.cpp (+1 -1)
===================================================================
--- test/test_storage.cpp    2013-05-24 17:21:34 +0900 (fc69217)
+++ test/test_storage.cpp    2013-05-24 20:09:55 +0900 (9e4d9ac)
@@ -26,7 +26,7 @@
 #include "grnxx/storage/file.hpp"
 #include "grnxx/storage/path.hpp"
 #include "grnxx/storage/chunk.hpp"
-#include "grnxx/time/periodic_clock.hpp"
+#include "grnxx/periodic_clock.hpp"
 #include "grnxx/types.hpp"
 
 namespace {

  Modified: test/test_string.cpp (+1 -1)
===================================================================
--- test/test_string.cpp    2013-05-24 17:21:34 +0900 (329ca37)
+++ test/test_string.cpp    2013-05-24 20:09:55 +0900 (38da7b1)
@@ -18,8 +18,8 @@
 #include <cassert>
 
 #include "grnxx/logger.hpp"
+#include "grnxx/stopwatch.hpp"
 #include "grnxx/string.hpp"
-#include "grnxx/time/stopwatch.hpp"
 
 void test_constructors() {
   assert(!grnxx::String());

  Modified: test/test_string_builder.cpp (+1 -1)
===================================================================
--- test/test_string_builder.cpp    2013-05-24 17:21:34 +0900 (dc9f89a)
+++ test/test_string_builder.cpp    2013-05-24 20:09:55 +0900 (b52741a)
@@ -19,7 +19,7 @@
 
 #include "grnxx/logger.hpp"
 #include "grnxx/string_builder.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 void test_basic_operations() {
   grnxx::StringBuilder builder;

  Modified: test/test_string_format.cpp (+1 -1)
===================================================================
--- test/test_string_format.cpp    2013-05-24 17:21:34 +0900 (3451371)
+++ test/test_string_format.cpp    2013-05-24 20:09:55 +0900 (a1af38e)
@@ -21,8 +21,8 @@
 #include <sstream>
 
 #include "grnxx/logger.hpp"
+#include "grnxx/stopwatch.hpp"
 #include "grnxx/string_format.hpp"
-#include "grnxx/time/stopwatch.hpp"
 
 void test_align() {
   grnxx::StringBuilder builder;

  Modified: test/test_thread.cpp (+2 -2)
===================================================================
--- test/test_thread.cpp    2013-05-24 17:21:34 +0900 (ecb0752)
+++ test/test_thread.cpp    2013-05-24 20:09:55 +0900 (7e3ffa3)
@@ -21,9 +21,9 @@
 #include "grnxx/lock.hpp"
 #include "grnxx/logger.hpp"
 #include "grnxx/mutex.hpp"
+#include "grnxx/stopwatch.hpp"
+#include "grnxx/system_clock.hpp"
 #include "grnxx/thread.hpp"
-#include "grnxx/time/stopwatch.hpp"
-#include "grnxx/time/system_clock.hpp"
 
 namespace {
 

  Modified: test/test_time.cpp (+5 -5)
===================================================================
--- test/test_time.cpp    2013-05-24 17:21:34 +0900 (1406966)
+++ test/test_time.cpp    2013-05-24 20:09:55 +0900 (555d04f)
@@ -17,13 +17,13 @@
 */
 #include <cassert>
 
+#include "grnxx/broken_down_time.hpp"
 #include "grnxx/logger.hpp"
+#include "grnxx/periodic_clock.hpp"
+#include "grnxx/stopwatch.hpp"
+#include "grnxx/system_clock.hpp"
 #include "grnxx/thread.hpp"
-#include "grnxx/time/broken_down_time.hpp"
-#include "grnxx/time/periodic_clock.hpp"
-#include "grnxx/time/stopwatch.hpp"
-#include "grnxx/time/system_clock.hpp"
-#include "grnxx/time/time.hpp"
+#include "grnxx/time.hpp"
 
 void test_time() {
   assert(grnxx::Time::max().count() ==
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る