Parcourir la source

Update Output use

Eric Ramat il y a 3 ans
Parent
commit
3764b61aaf
2 fichiers modifiés avec 18 ajouts et 10 suppressions
  1. 2 2
      CMakeLists.txt
  2. 16 8
      src/tests/qss/main.cpp

+ 2 - 2
CMakeLists.txt

@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(ARTIS_TEST CXX C)
+PROJECT(ARTIS_TEST CXX)
 ENABLE_TESTING()
 
 SET(ARTIS_TEST_MAJOR 0)
@@ -81,7 +81,7 @@ INCLUDE(CMakeDetermineCCompiler)
 FIND_PACKAGE(PkgConfig REQUIRED)
 
 PKG_CHECK_MODULES(ARTIS REQUIRED artis-star-1.0)
-PKG_CHECK_MODULES(ARTIS_TEST REQUIRED artis-addons-1.0)
+PKG_CHECK_MODULES(ARTIS_ADDONS REQUIRED artis-addons-1.0)
 
 #
 # Test the libboost header and libboost-text library.

+ 16 - 8
src/tests/qss/main.cpp

@@ -103,9 +103,11 @@ void run_predator_prey(artis::common::context::Context<artis::common::DoubleTime
 
   rc.run(context);
 
-  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
+  artis::observer::Output<artis::common::DoubleTime,
+                          artis::observer::TimedIterator<artis::common::DoubleTime>>
+      output(rc.observer());
 
-  output(0, 100, 0.1);
+  output(context.begin(), context.end(), {context.begin(), 0.1});
 
   //  rc.save(context);
 //
@@ -197,9 +199,11 @@ void test_predator_prey_smart_gardener()
 
   rc.run(context);
 
-  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
+  artis::observer::Output<artis::common::DoubleTime,
+                          artis::observer::TimedIterator<artis::common::DoubleTime>>
+      output(rc.observer());
 
-  output(0, 100, 0.1);
+  output(context.begin(), context.end(), {context.begin(), 0.1});
 }
 
 class MixedPredatorPreyView : public artis::observer::View<artis::common::DoubleTime>
@@ -234,9 +238,11 @@ void test_mixed_predator_prey()
 
   rc.run(context);
 
-  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
+  artis::observer::Output<artis::common::DoubleTime,
+                          artis::observer::TimedIterator<artis::common::DoubleTime>>
+      output(rc.observer());
 
-  output(0, 100, 0.1);
+  output(context.begin(), context.end(), {context.begin(), 0.1});
 }
 
 class MultiPredatorPreyView : public artis::observer::View<artis::common::DoubleTime>
@@ -278,9 +284,11 @@ void test_multi_predator_prey()
 
   rc.run(context);
 
-  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
+  artis::observer::Output<artis::common::DoubleTime,
+                          artis::observer::TimedIterator<artis::common::DoubleTime>>
+      output(rc.observer());
 
-  output(0, 100, 0.1);
+  output(context.begin(), context.end(), {context.begin(), 0.1});
 }
 
 int main()