Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82801 - trunk/libs/chrono/test
From: vicente.botet_at_[hidden]
Date: 2013-02-09 19:41:14


Author: viboes
Date: 2013-02-09 19:41:13 EST (Sat, 09 Feb 2013)
New Revision: 82801
URL: http://svn.boost.org/trac/boost/changeset/82801

Log:
Chrono: Added two objects tests.
Added:
   trunk/libs/chrono/test/another_obj.cpp (contents, props changed)
   trunk/libs/chrono/test/one_obj.cpp (contents, props changed)
Text files modified:
   trunk/libs/chrono/test/Jamfile.v2 | 6 ++++--
   1 files changed, 4 insertions(+), 2 deletions(-)

Modified: trunk/libs/chrono/test/Jamfile.v2
==============================================================================
--- trunk/libs/chrono/test/Jamfile.v2 (original)
+++ trunk/libs/chrono/test/Jamfile.v2 2013-02-09 19:41:13 EST (Sat, 09 Feb 2013)
@@ -222,7 +222,7 @@
         : $(sources[1]:B)_h ]
     ;
 }
-rule chrono-run2-mt ( sources : name )
+rule chrono-run2-mt ( sources * : name )
 {
     return
     [ run $(sources) ../build//boost_chrono
@@ -451,6 +451,7 @@
     test-suite "clock"
         :
         [ chrono-run2-mt clock/clock_pass.cpp : clock_clock_p ]
+ [ chrono-run2-mt one_obj.cpp another_obj.cpp : two_obj_p ]
         ;
 
     test-suite "stopwatch"
@@ -510,7 +511,8 @@
         [ chrono-run win32_test.cpp ]
         ;
 
- test-suite "ts"
+ explicit ts_ ;
+ test-suite ts_
         :
         #[ chrono-run test_xx.cpp ]
         ;

Added: trunk/libs/chrono/test/another_obj.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/chrono/test/another_obj.cpp 2013-02-09 19:41:13 EST (Sat, 09 Feb 2013)
@@ -0,0 +1,19 @@
+// boost win32_test.cpp -----------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+#include <iostream>
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/chrono_io.hpp>
+
+void another() {
+ boost::chrono::steady_clock::time_point t1=boost::chrono::steady_clock::now();
+ boost::chrono::steady_clock::time_point t2=boost::chrono::steady_clock::now();
+ std::cout << t2-t1 << std::endl;
+ return ;
+}
+

Added: trunk/libs/chrono/test/one_obj.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/chrono/test/one_obj.cpp 2013-02-09 19:41:13 EST (Sat, 09 Feb 2013)
@@ -0,0 +1,23 @@
+// boost win32_test.cpp -----------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+#include <iostream>
+#include <boost/chrono/chrono.hpp>
+#include <boost/chrono/chrono_io.hpp>
+
+void another();
+
+int main()
+{
+ boost::chrono::steady_clock::time_point t1=boost::chrono::steady_clock::now();
+ another();
+ boost::chrono::steady_clock::time_point t2=boost::chrono::steady_clock::now();
+ std::cout << t2-t1 << std::endl;
+ return 0;
+}
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk