Преглед на файлове

Add new example for MultiQSS

Eric Ramat преди 5 години
родител
ревизия
448482fb47
променени са 34 файла, в които са добавени 1862 реда и са изтрити 906 реда
  1. 1 3
      AUTHORS
  2. 749 371
      src/tests/catch.hpp
  3. 4 2
      src/tests/common/multithreading-tests.cpp
  4. 6 3
      src/tests/common/time-tests.cpp
  5. 10 5
      src/tests/devs/graph_manager.hpp
  6. 38 19
      src/tests/devs/models.hpp
  7. 2 1
      src/tests/devs/tests.cpp
  8. 16 8
      src/tests/dsde/graph_manager.hpp
  9. 22 11
      src/tests/dsde/models.hpp
  10. 2 1
      src/tests/dsde/tests.cpp
  11. 12 6
      src/tests/dtss/graph_manager.hpp
  12. 26 13
      src/tests/dtss/models.hpp
  13. 4 2
      src/tests/dtss/tests.cpp
  14. 6 3
      src/tests/fddevs/graph_manager.hpp
  15. 54 27
      src/tests/fddevs/models.hpp
  16. 2 1
      src/tests/fddevs/tests.cpp
  17. 50 25
      src/tests/mixed/graph_manager.hpp
  18. 94 47
      src/tests/mixed/models.hpp
  19. 2 1
      src/tests/mixed/tests.cpp
  20. 76 38
      src/tests/mpi/graph_manager.hpp
  21. 8 4
      src/tests/mpi/main.cpp
  22. 34 17
      src/tests/multithreading/lifegame/graph_manager.hpp
  23. 12 6
      src/tests/multithreading/lifegame/main.cpp
  24. 28 14
      src/tests/multithreading/lifegame/models.hpp
  25. 36 18
      src/tests/multithreading/simple/graph_manager.hpp
  26. 6 3
      src/tests/multithreading/simple/main.cpp
  27. 76 38
      src/tests/multithreading/simple/models.hpp
  28. 34 17
      src/tests/pdevs/graph_manager.hpp
  29. 2 1
      src/tests/pdevs/main.cpp
  30. 102 51
      src/tests/pdevs/models.hpp
  31. 8 4
      src/tests/pdevs/tests.cpp
  32. 109 52
      src/tests/qss/graph_manager.hpp
  33. 123 59
      src/tests/qss/main.cpp
  34. 108 35
      src/tests/qss/models.hpp

+ 1 - 3
AUTHORS

@@ -26,6 +26,4 @@ Main programmer and founder
 
 
 Contributors
-------------
-
-- Christopher Herbez <christopher.herbez@gmail.com>
+------------

+ 749 - 371
src/tests/catch.hpp

@@ -434,19 +434,24 @@ unsigned int rngSeed();
 #include <cstdint>
 
 // We need a dummy global operator<< so we can bring it into Catch namespace later
-struct Catch_global_namespace_dummy {};
+struct Catch_global_namespace_dummy
+{
+};
 std::ostream &operator<<(std::ostream &, Catch_global_namespace_dummy);
 
 namespace Catch {
 
-struct CaseSensitive {
-  enum Choice {
+struct CaseSensitive
+{
+  enum Choice
+  {
     Yes,
     No
   };
 };
 
-class NonCopyable {
+class NonCopyable
+{
   NonCopyable(NonCopyable const &) = delete;
   NonCopyable(NonCopyable &&) = delete;
   NonCopyable &operator=(NonCopyable const &) = delete;
@@ -457,12 +462,14 @@ protected:
   virtual ~NonCopyable();
 };
 
-struct SourceLineInfo {
+struct SourceLineInfo
+{
 
   SourceLineInfo() = delete;
   SourceLineInfo(char const *_file, std::size_t _line) noexcept
       : file(_file),
-        line(_line) {}
+        line(_line)
+  {}
 
   SourceLineInfo(SourceLineInfo const &other) = default;
   SourceLineInfo &operator=(SourceLineInfo const &) = default;
@@ -488,11 +495,13 @@ using ::operator<<;
 //    >> +StreamEndStop
 // as well as
 //    >> stuff +StreamEndStop
-struct StreamEndStop {
+struct StreamEndStop
+{
   std::string operator+() const;
 };
 template<typename T>
-T const &operator+(T const &value, StreamEndStop) {
+T const &operator+(T const &value, StreamEndStop)
+{
   return value;
 }
 }
@@ -503,7 +512,8 @@ T const &operator+(T const &value, StreamEndStop) {
 // end catch_common.h
 namespace Catch {
 
-struct RegistrarForTagAliases {
+struct RegistrarForTagAliases
+{
   RegistrarForTagAliases(char const *alias, char const *tag, SourceLineInfo const &lineInfo);
 };
 
@@ -525,7 +535,8 @@ namespace Catch {
 
 class TestSpec;
 
-struct ITestInvoker {
+struct ITestInvoker
+{
   virtual void invoke() const = 0;
   virtual ~ITestInvoker();
 };
@@ -533,7 +544,8 @@ struct ITestInvoker {
 class TestCase;
 struct IConfig;
 
-struct ITestCaseRegistry {
+struct ITestCaseRegistry
+{
   virtual ~ITestCaseRegistry();
   virtual std::vector<TestCase> const &getAllTests() const = 0;
   virtual std::vector<TestCase> const &getAllTestsSorted(IConfig const &config) const = 0;
@@ -564,7 +576,8 @@ namespace Catch {
 /// (taking a copy), if necessary. In theory this ownership is not externally
 /// visible - but it does mean (substring) StringRefs should not be shared between
 /// threads.
-class StringRef {
+class StringRef
+{
 public:
   using size_type = std::size_t;
 
@@ -582,16 +595,19 @@ private:
 
 public: // construction/ assignment
   StringRef() noexcept
-      : StringRef(s_empty, 0) {}
+      : StringRef(s_empty, 0)
+  {}
 
   StringRef(StringRef const &other) noexcept
       : m_start(other.m_start),
-        m_size(other.m_size) {}
+        m_size(other.m_size)
+  {}
 
   StringRef(StringRef &&other) noexcept
       : m_start(other.m_start),
         m_size(other.m_size),
-        m_data(other.m_data) {
+        m_data(other.m_data)
+  {
     other.m_data = nullptr;
   }
 
@@ -599,17 +615,21 @@ public: // construction/ assignment
 
   StringRef(char const *rawChars, size_type size) noexcept
       : m_start(rawChars),
-        m_size(size) {}
+        m_size(size)
+  {}
 
   StringRef(std::string const &stdString) noexcept
       : m_start(stdString.c_str()),
-        m_size(stdString.size()) {}
+        m_size(stdString.size())
+  {}
 
-  ~StringRef() noexcept {
+  ~StringRef() noexcept
+  {
     delete[] m_data;
   }
 
-  auto operator=(StringRef const &other) noexcept -> StringRef & {
+  auto operator=(StringRef const &other) noexcept -> StringRef &
+  {
     delete[] m_data;
     m_data = nullptr;
     m_start = other.m_start;
@@ -628,10 +648,12 @@ public: // operators
   auto operator[](size_type index) const noexcept -> char;
 
 public: // named queries
-  auto empty() const noexcept -> bool {
+  auto empty() const noexcept -> bool
+  {
     return m_size == 0;
   }
-  auto size() const noexcept -> size_type {
+  auto size() const noexcept -> size_type
+  {
     return m_size;
   }
 
@@ -657,14 +679,16 @@ auto operator+(char const *lhs, StringRef const &rhs) -> std::string;
 auto operator+=(std::string &lhs, StringRef const &sr) -> std::string &;
 auto operator<<(std::ostream &os, StringRef const &sr) -> std::ostream &;
 
-inline auto operator "" _sr(char const *rawChars, std::size_t size) noexcept -> StringRef {
+inline auto operator "" _sr(char const *rawChars, std::size_t size) noexcept -> StringRef
+{
   return StringRef(rawChars, size);
 }
 
 } // namespace Catch
 
 inline auto operator "" _catch_sr(char const *rawChars,
-                                  std::size_t size) noexcept -> Catch::StringRef {
+                                  std::size_t size) noexcept -> Catch::StringRef
+{
   return Catch::StringRef(rawChars, size);
 }
 
@@ -687,7 +711,9 @@ namespace Catch {
 #else
 
 template<typename...>
-struct is_unique : std::true_type {};
+struct is_unique : std::true_type
+{
+};
 
 template<typename T0, typename T1, typename... Rest>
 struct is_unique<T0, T1, Rest...> : std::integral_constant
@@ -695,7 +721,8 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
                                          !std::is_same<T0, T1>::value
                                              && is_unique<T0, Rest...>::value
                                              && is_unique<T1, Rest...>::value
-                                        > {
+                                        >
+{
 };
 
 #endif
@@ -923,10 +950,15 @@ struct is_unique<T0, T1, Rest...> : std::integral_constant
 
 namespace Catch {
 template<typename T>
-struct always_false : std::false_type {};
+struct always_false : std::false_type
+{
+};
 
-template<typename> struct true_given : std::true_type {};
-struct is_callable_tester {
+template<typename> struct true_given : std::true_type
+{
+};
+struct is_callable_tester
+{
   template<typename Fun, typename... Args>
   true_given<decltype(std::declval<Fun>()(std::declval<Args>()...))> static test(int);
   template<typename...>
@@ -937,7 +969,9 @@ template<typename T>
 struct is_callable;
 
 template<typename Fun, typename... Args>
-struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0)) {};
+struct is_callable<Fun(Args...)> : decltype(is_callable_tester::test<Fun, Args...>(0))
+{
+};
 
 } // namespace Catch
 
@@ -949,12 +983,15 @@ struct na;
 namespace Catch {
 
 template<typename C>
-class TestInvokerAsMethod : public ITestInvoker {
+class TestInvokerAsMethod : public ITestInvoker
+{
   void (C::*m_testAsMethod)();
 public:
-  TestInvokerAsMethod(void (C::*testAsMethod)()) noexcept : m_testAsMethod(testAsMethod) {}
+  TestInvokerAsMethod(void (C::*testAsMethod)()) noexcept : m_testAsMethod(testAsMethod)
+  {}
 
-  void invoke() const override {
+  void invoke() const override
+  {
     C obj;
     (obj.*m_testAsMethod)();
   }
@@ -963,18 +1000,21 @@ public:
 auto makeTestInvoker(void(*testAsFunction)()) noexcept -> ITestInvoker *;
 
 template<typename C>
-auto makeTestInvoker(void (C::*testAsMethod)()) noexcept -> ITestInvoker * {
+auto makeTestInvoker(void (C::*testAsMethod)()) noexcept -> ITestInvoker *
+{
   return new(std::nothrow)
   TestInvokerAsMethod<C>( testAsMethod );
 }
 
-struct NameAndTags {
+struct NameAndTags
+{
   NameAndTags(StringRef const &name_ = StringRef(), StringRef const &tags_ = StringRef()) noexcept;
   StringRef name;
   StringRef tags;
 };
 
-struct AutoReg : NonCopyable {
+struct AutoReg : NonCopyable
+{
   AutoReg(ITestInvoker *invoker,
           SourceLineInfo const &lineInfo,
           StringRef const &classOrMethod,
@@ -1332,8 +1372,10 @@ struct AutoReg : NonCopyable {
 namespace Catch {
 
 // ResultWas::OfType enum
-struct ResultWas {
-  enum OfType {
+struct ResultWas
+{
+  enum OfType
+  {
     Unknown = -1,
     Ok = 0,
     Info = 1,
@@ -1358,8 +1400,10 @@ bool isOk(ResultWas::OfType resultType);
 bool isJustInfo(int flags);
 
 // ResultDisposition::Flags enum
-struct ResultDisposition {
-  enum Flags {
+struct ResultDisposition
+{
+  enum Flags
+  {
     Normal = 0x01,
 
     ContinueOnFailure = 0x02,   // Failures fail test, but execution continues
@@ -1371,7 +1415,8 @@ struct ResultDisposition {
 ResultDisposition::Flags operator|(ResultDisposition::Flags lhs, ResultDisposition::Flags rhs);
 
 bool shouldContinueOnFailure(int flags);
-inline bool isFalseTest(int flags) { return (flags & ResultDisposition::FalseTest) != 0; }
+inline bool isFalseTest(int flags)
+{ return (flags & ResultDisposition::FalseTest) != 0; }
 bool shouldSuppressFailure(int flags);
 
 } // end namespace Catch
@@ -1379,7 +1424,8 @@ bool shouldSuppressFailure(int flags);
 // end catch_result_type.h
 namespace Catch {
 
-struct AssertionInfo {
+struct AssertionInfo
+{
   StringRef macroName;
   SourceLineInfo lineInfo;
   StringRef capturedExpression;
@@ -1415,14 +1461,16 @@ std::ostream &clog();
 
 class StringRef;
 
-struct IStream {
+struct IStream
+{
   virtual ~IStream();
   virtual std::ostream &stream() const = 0;
 };
 
 auto makeStream(StringRef const &filename) -> IStream const *;
 
-class ReusableStringStream {
+class ReusableStringStream
+{
   std::size_t m_index;
   std::ostream *m_oss;
 public:
@@ -1432,11 +1480,13 @@ public:
   auto str() const -> std::string;
 
   template<typename T>
-  auto operator<<(T const &value) -> ReusableStringStream & {
+  auto operator<<(T const &value) -> ReusableStringStream &
+  {
     *m_oss << value;
     return *this;
   }
-  auto get() -> std::ostream & { return *m_oss; }
+  auto get() -> std::ostream &
+  { return *m_oss; }
 };
 }
 
@@ -1448,7 +1498,8 @@ public:
 namespace Catch {
 
 namespace Detail {
-struct EnumInfo {
+struct EnumInfo
+{
   StringRef m_name;
   std::vector<std::pair<int, std::string>> m_values;
 
@@ -1458,7 +1509,8 @@ struct EnumInfo {
 };
 } // namespace Detail
 
-struct IMutableEnumValuesRegistry {
+struct IMutableEnumValuesRegistry
+{
   virtual ~IMutableEnumValuesRegistry();
 
   virtual Detail::EnumInfo const &registerEnum(StringRef enumName,
@@ -1468,7 +1520,8 @@ struct IMutableEnumValuesRegistry {
   template<typename E>
   Detail::EnumInfo const &registerEnum(StringRef enumName,
                                        StringRef allEnums,
-                                       std::initializer_list<E> values) {
+                                       std::initializer_list<E> values)
+  {
     std::vector<int> intValues;
     intValues.reserve(values.size());
     for (auto enumValue : values)
@@ -1544,12 +1597,14 @@ extern const std::string unprintableString;
 std::string rawMemoryToString(const void *object, std::size_t size);
 
 template<typename T>
-std::string rawMemoryToString(const T &object) {
+std::string rawMemoryToString(const T &object)
+{
   return rawMemoryToString(&object, sizeof(object));
 }
 
 template<typename T>
-class IsStreamInsertable {
+class IsStreamInsertable
+{
   template<typename SS, typename TT>
   static auto test(int)
   -> decltype(std::declval<SS &>() << std::declval<TT>(), std::true_type());
@@ -1567,19 +1622,22 @@ std::string convertUnknownEnumToString(E e);
 template<typename T>
 typename std::enable_if<
     !std::is_enum<T>::value && !std::is_base_of<std::exception, T>::value,
-    std::string>::type convertUnstreamable(T const &) {
+    std::string>::type convertUnstreamable(T const &)
+{
   return Detail::unprintableString;
 }
 template<typename T>
 typename std::enable_if<
     !std::is_enum<T>::value && std::is_base_of<std::exception, T>::value,
-    std::string>::type convertUnstreamable(T const &ex) {
+    std::string>::type convertUnstreamable(T const &ex)
+{
   return ex.what();
 }
 
 template<typename T>
 typename std::enable_if<
-    std::is_enum<T>::value, std::string>::type convertUnstreamable(T const &value) {
+    std::is_enum<T>::value, std::string>::type convertUnstreamable(T const &value)
+{
   return convertUnknownEnumToString(value);
 }
 
@@ -1599,11 +1657,13 @@ typename std::enable_if<
 
 // If we decide for C++14, change these to enable_if_ts
 template<typename T, typename = void>
-struct StringMaker {
+struct StringMaker
+{
   template<typename Fake = T>
   static
   typename std::enable_if<::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
-  convert(const Fake &value) {
+  convert(const Fake &value)
+  {
     ReusableStringStream rss;
     // NB: call using the function-like syntax to avoid ambiguity with
     // user-defined templated operator<< under clang.
@@ -1614,7 +1674,8 @@ struct StringMaker {
   template<typename Fake = T>
   static
   typename std::enable_if<!::Catch::Detail::IsStreamInsertable<Fake>::value, std::string>::type
-  convert(const Fake &value) {
+  convert(const Fake &value)
+  {
 #if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER)
     return Detail::convertUnstreamable(value);
 #else
@@ -1628,13 +1689,15 @@ namespace Detail {
 // This function dispatches all stringification requests inside of Catch.
 // Should be preferably called fully qualified, like ::Catch::Detail::stringify
 template<typename T>
-std::string stringify(const T &e) {
+std::string stringify(const T &e)
+{
   return ::Catch::StringMaker<typename std::remove_cv<typename std::remove_reference<T>::type>::type>::convert(
       e);
 }
 
 template<typename E>
-std::string convertUnknownEnumToString(E e) {
+std::string convertUnknownEnumToString(E e)
+{
   return ::Catch::Detail::stringify(static_cast<typename std::underlying_type<E>::type>(e));
 }
 
@@ -1650,7 +1713,8 @@ std::string convertUnknownEnumToString(E e) {
 // Some predefined specializations
 
 template<>
-struct StringMaker<std::string> {
+struct StringMaker<std::string>
+{
   static std::string convert(const std::string &str);
 };
 
@@ -1662,17 +1726,20 @@ struct StringMaker<std::string> {
 #endif
 
 template<>
-struct StringMaker<char const *> {
+struct StringMaker<char const *>
+{
   static std::string convert(char const *str);
 };
 template<>
-struct StringMaker<char *> {
+struct StringMaker<char *>
+{
   static std::string convert(char *str);
 };
 
 #ifdef CATCH_CONFIG_WCHAR
 template<>
-struct StringMaker<std::wstring> {
+struct StringMaker<std::wstring>
+{
   static std::string convert(const std::wstring &wstr);
 };
 
@@ -1684,11 +1751,13 @@ struct StringMaker<std::wstring> {
 # endif
 
 template<>
-struct StringMaker<wchar_t const *> {
+struct StringMaker<wchar_t const *>
+{
   static std::string convert(wchar_t const *str);
 };
 template<>
-struct StringMaker<wchar_t *> {
+struct StringMaker<wchar_t *>
+{
   static std::string convert(wchar_t *str);
 };
 #endif
@@ -1696,20 +1765,26 @@ struct StringMaker<wchar_t *> {
 // TBD: Should we use `strnlen` to ensure that we don't go out of the buffer,
 //      while keeping string semantics?
 template<int SZ>
-struct StringMaker<char[SZ]> {
-  static std::string convert(char const *str) {
+struct StringMaker<char[SZ]>
+{
+  static std::string convert(char const *str)
+  {
     return ::Catch::Detail::stringify(std::string{str});
   }
 };
 template<int SZ>
-struct StringMaker<signed char[SZ]> {
-  static std::string convert(signed char const *str) {
+struct StringMaker<signed char[SZ]>
+{
+  static std::string convert(signed char const *str)
+  {
     return ::Catch::Detail::stringify(std::string{reinterpret_cast<char const *>(str)});
   }
 };
 template<int SZ>
-struct StringMaker<unsigned char[SZ]> {
-  static std::string convert(unsigned char const *str) {
+struct StringMaker<unsigned char[SZ]>
+{
+  static std::string convert(unsigned char const *str)
+  {
     return ::Catch::Detail::stringify(std::string{reinterpret_cast<char const *>(str)});
   }
 };
@@ -1721,69 +1796,84 @@ struct StringMaker<unsigned char[SZ]> {
     };
 #endif // defined(CATCH_CONFIG_CPP17_BYTE)
 template<>
-struct StringMaker<int> {
+struct StringMaker<int>
+{
   static std::string convert(int value);
 };
 template<>
-struct StringMaker<long> {
+struct StringMaker<long>
+{
   static std::string convert(long value);
 };
 template<>
-struct StringMaker<long long> {
+struct StringMaker<long long>
+{
   static std::string convert(long long value);
 };
 template<>
-struct StringMaker<unsigned int> {
+struct StringMaker<unsigned int>
+{
   static std::string convert(unsigned int value);
 };
 template<>
-struct StringMaker<unsigned long> {
+struct StringMaker<unsigned long>
+{
   static std::string convert(unsigned long value);
 };
 template<>
-struct StringMaker<unsigned long long> {
+struct StringMaker<unsigned long long>
+{
   static std::string convert(unsigned long long value);
 };
 
 template<>
-struct StringMaker<bool> {
+struct StringMaker<bool>
+{
   static std::string convert(bool b);
 };
 
 template<>
-struct StringMaker<char> {
+struct StringMaker<char>
+{
   static std::string convert(char c);
 };
 template<>
-struct StringMaker<signed char> {
+struct StringMaker<signed char>
+{
   static std::string convert(signed char c);
 };
 template<>
-struct StringMaker<unsigned char> {
+struct StringMaker<unsigned char>
+{
   static std::string convert(unsigned char c);
 };
 
 template<>
-struct StringMaker<std::nullptr_t> {
+struct StringMaker<std::nullptr_t>
+{
   static std::string convert(std::nullptr_t);
 };
 
 template<>
-struct StringMaker<float> {
+struct StringMaker<float>
+{
   static std::string convert(float value);
   static int precision;
 };
 
 template<>
-struct StringMaker<double> {
+struct StringMaker<double>
+{
   static std::string convert(double value);
   static int precision;
 };
 
 template<typename T>
-struct StringMaker<T *> {
+struct StringMaker<T *>
+{
   template<typename U>
-  static std::string convert(U *p) {
+  static std::string convert(U *p)
+  {
     if (p) {
       return ::Catch::Detail::rawMemoryToString(p);
     } else {
@@ -1793,8 +1883,10 @@ struct StringMaker<T *> {
 };
 
 template<typename R, typename C>
-struct StringMaker<R C::*> {
-  static std::string convert(R C::* p) {
+struct StringMaker<R C::*>
+{
+  static std::string convert(R C::* p)
+  {
     if (p) {
       return ::Catch::Detail::rawMemoryToString(p);
     } else {
@@ -1814,7 +1906,8 @@ struct StringMaker<R C::*> {
 
 namespace Detail {
 template<typename InputIterator>
-std::string rangeToString(InputIterator first, InputIterator last) {
+std::string rangeToString(InputIterator first, InputIterator last)
+{
   ReusableStringStream rss;
   rss << "{ ";
   if (first != last) {
@@ -1972,7 +2065,9 @@ namespace Catch {
 #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER
 
 namespace Catch {
-struct not_this_one {}; // Tag type for detecting which begin/ end are being selected
+struct not_this_one
+{
+}; // Tag type for detecting which begin/ end are being selected
 
 // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace
 using std::begin;
@@ -1982,7 +2077,8 @@ not_this_one begin(...);
 not_this_one end(...);
 
 template<typename T>
-struct is_range {
+struct is_range
+{
   static const bool value =
       !std::is_same<decltype(begin(std::declval<T>())), not_this_one>::value &&
           !std::is_same<decltype(end(std::declval<T>())), not_this_one>::value;
@@ -1996,13 +2092,15 @@ struct is_range {
 #endif
 
 template<typename Range>
-std::string rangeToString(Range const &range) {
+std::string rangeToString(Range const &range)
+{
   return ::Catch::Detail::rangeToString(begin(range), end(range));
 }
 
 // Handle vector<bool> specially
 template<typename Allocator>
-std::string rangeToString(std::vector<bool, Allocator> const &v) {
+std::string rangeToString(std::vector<bool, Allocator> const &v)
+{
   ReusableStringStream rss;
   rss << "{ ";
   bool first = true;
@@ -2020,15 +2118,19 @@ std::string rangeToString(std::vector<bool, Allocator> const &v) {
 template<typename R>
 struct StringMaker<R,
                    typename std::enable_if<is_range<R>::value
-                                               && !::Catch::Detail::IsStreamInsertable<R>::value>::type> {
-  static std::string convert(R const &range) {
+                                               && !::Catch::Detail::IsStreamInsertable<R>::value>::type>
+{
+  static std::string convert(R const &range)
+  {
     return rangeToString(range);
   }
 };
 
 template<typename T, int SZ>
-struct StringMaker<T[SZ]> {
-  static std::string convert(T const(&arr)[SZ]) {
+struct StringMaker<T[SZ]>
+{
+  static std::string convert(T const(&arr)[SZ])
+  {
     return rangeToString(arr);
   }
 };
@@ -2182,14 +2284,18 @@ namespace Catch { \
 
 namespace Catch {
 
-struct ITransientExpression {
-  auto isBinaryExpression() const -> bool { return m_isBinaryExpression; }
-  auto getResult() const -> bool { return m_result; }
+struct ITransientExpression
+{
+  auto isBinaryExpression() const -> bool
+  { return m_isBinaryExpression; }
+  auto getResult() const -> bool
+  { return m_result; }
   virtual void streamReconstructedExpression(std::ostream &os) const = 0;
 
   ITransientExpression(bool isBinaryExpression, bool result)
       : m_isBinaryExpression(isBinaryExpression),
-        m_result(result) {}
+        m_result(result)
+  {}
 
   // We don't actually need a virtual destructor, but many static analysers
   // complain if it's not here :-(
@@ -2206,12 +2312,14 @@ void formatReconstructedExpression(std::ostream &os,
                                    std::string const &rhs);
 
 template<typename LhsT, typename RhsT>
-class BinaryExpr : public ITransientExpression {
+class BinaryExpr : public ITransientExpression
+{
   LhsT m_lhs;
   StringRef m_op;
   RhsT m_rhs;
 
-  void streamReconstructedExpression(std::ostream &os) const override {
+  void streamReconstructedExpression(std::ostream &os) const override
+  {
     formatReconstructedExpression
         (os, Catch::Detail::stringify(m_lhs), m_op, Catch::Detail::stringify(m_rhs));
   }
@@ -2221,59 +2329,68 @@ public:
       : ITransientExpression{true, comparisonResult},
         m_lhs(lhs),
         m_op(op),
-        m_rhs(rhs) {}
+        m_rhs(rhs)
+  {}
 
   template<typename T>
-  auto operator&&(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator&&(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator||(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator||(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator==(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator==(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator!=(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator!=(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator>(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator>(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator<(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator<(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator>=(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator>=(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename T>
-  auto operator<=(T) const -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator<=(T) const -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<T>::value,
                   "chained comparisons are not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
@@ -2281,114 +2398,140 @@ public:
 };
 
 template<typename LhsT>
-class UnaryExpr : public ITransientExpression {
+class UnaryExpr : public ITransientExpression
+{
   LhsT m_lhs;
 
-  void streamReconstructedExpression(std::ostream &os) const override {
+  void streamReconstructedExpression(std::ostream &os) const override
+  {
     os << Catch::Detail::stringify(m_lhs);
   }
 
 public:
   explicit UnaryExpr(LhsT lhs)
       : ITransientExpression{false, static_cast<bool>(lhs)},
-        m_lhs(lhs) {}
+        m_lhs(lhs)
+  {}
 };
 
 // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int)
 template<typename LhsT, typename RhsT>
-auto compareEqual(LhsT const &lhs, RhsT const &rhs) -> bool {
+auto compareEqual(LhsT const &lhs, RhsT const &rhs) -> bool
+{
   return static_cast<bool>(lhs == rhs);
 }
 template<typename T>
-auto compareEqual(T *const &lhs, int rhs) -> bool {
+auto compareEqual(T *const &lhs, int rhs) -> bool
+{
   return lhs == reinterpret_cast<void const *>( rhs );
 }
 template<typename T>
-auto compareEqual(T *const &lhs, long rhs) -> bool {
+auto compareEqual(T *const &lhs, long rhs) -> bool
+{
   return lhs == reinterpret_cast<void const *>( rhs );
 }
 template<typename T>
-auto compareEqual(int lhs, T *const &rhs) -> bool {
+auto compareEqual(int lhs, T *const &rhs) -> bool
+{
   return reinterpret_cast<void const *>( lhs ) == rhs;
 }
 template<typename T>
-auto compareEqual(long lhs, T *const &rhs) -> bool {
+auto compareEqual(long lhs, T *const &rhs) -> bool
+{
   return reinterpret_cast<void const *>( lhs ) == rhs;
 }
 
 template<typename LhsT, typename RhsT>
-auto compareNotEqual(LhsT const &lhs, RhsT &&rhs) -> bool { return static_cast<bool>(lhs != rhs); }
+auto compareNotEqual(LhsT const &lhs, RhsT &&rhs) -> bool
+{ return static_cast<bool>(lhs != rhs); }
 template<typename T>
-auto compareNotEqual(T *const &lhs, int rhs) -> bool {
+auto compareNotEqual(T *const &lhs, int rhs) -> bool
+{
   return lhs != reinterpret_cast<void const *>( rhs );
 }
 template<typename T>
-auto compareNotEqual(T *const &lhs, long rhs) -> bool {
+auto compareNotEqual(T *const &lhs, long rhs) -> bool
+{
   return lhs != reinterpret_cast<void const *>( rhs );
 }
 template<typename T>
-auto compareNotEqual(int lhs, T *const &rhs) -> bool {
+auto compareNotEqual(int lhs, T *const &rhs) -> bool
+{
   return reinterpret_cast<void const *>( lhs ) != rhs;
 }
 template<typename T>
-auto compareNotEqual(long lhs, T *const &rhs) -> bool {
+auto compareNotEqual(long lhs, T *const &rhs) -> bool
+{
   return reinterpret_cast<void const *>( lhs ) != rhs;
 }
 
 template<typename LhsT>
-class ExprLhs {
+class ExprLhs
+{
   LhsT m_lhs;
 public:
-  explicit ExprLhs(LhsT lhs) : m_lhs(lhs) {}
+  explicit ExprLhs(LhsT lhs) : m_lhs(lhs)
+  {}
 
   template<typename RhsT>
-  auto operator==(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator==(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {compareEqual(m_lhs, rhs), m_lhs, "==", rhs};
   }
-  auto operator==(bool rhs) -> BinaryExpr<LhsT, bool> const {
+  auto operator==(bool rhs) -> BinaryExpr<LhsT, bool> const
+  {
     return {m_lhs == rhs, m_lhs, "==", rhs};
   }
 
   template<typename RhsT>
-  auto operator!=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator!=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {compareNotEqual(m_lhs, rhs), m_lhs, "!=", rhs};
   }
-  auto operator!=(bool rhs) -> BinaryExpr<LhsT, bool> const {
+  auto operator!=(bool rhs) -> BinaryExpr<LhsT, bool> const
+  {
     return {m_lhs != rhs, m_lhs, "!=", rhs};
   }
 
   template<typename RhsT>
-  auto operator>(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator>(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {static_cast<bool>(m_lhs > rhs), m_lhs, ">", rhs};
   }
   template<typename RhsT>
-  auto operator<(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator<(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {static_cast<bool>(m_lhs < rhs), m_lhs, "<", rhs};
   }
   template<typename RhsT>
-  auto operator>=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator>=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {static_cast<bool>(m_lhs >= rhs), m_lhs, ">=", rhs};
   }
   template<typename RhsT>
-  auto operator<=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator<=(RhsT const &rhs) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     return {static_cast<bool>(m_lhs <= rhs), m_lhs, "<=", rhs};
   }
 
   template<typename RhsT>
-  auto operator&&(RhsT const &) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator&&(RhsT const &) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<RhsT>::value,
                   "operator&& is not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
   template<typename RhsT>
-  auto operator||(RhsT const &) -> BinaryExpr<LhsT, RhsT const &> const {
+  auto operator||(RhsT const &) -> BinaryExpr<LhsT, RhsT const &> const
+  {
     static_assert(always_false<RhsT>::value,
                   "operator|| is not supported inside assertions, "
                   "wrap the expression inside parentheses, or decompose it");
   }
 
-  auto makeUnaryExpr() const -> UnaryExpr<LhsT> {
+  auto makeUnaryExpr() const -> UnaryExpr<LhsT>
+  {
     return UnaryExpr<LhsT>{m_lhs};
   }
 };
@@ -2396,17 +2539,21 @@ public:
 void handleExpression(ITransientExpression const &expr);
 
 template<typename T>
-void handleExpression(ExprLhs<T> const &expr) {
+void handleExpression(ExprLhs<T> const &expr)
+{
   handleExpression(expr.makeUnaryExpr());
 }
 
-struct Decomposer {
+struct Decomposer
+{
   template<typename T>
-  auto operator<=(T const &lhs) -> ExprLhs<T const &> {
+  auto operator<=(T const &lhs) -> ExprLhs<T const &>
+  {
     return ExprLhs<T const &>{lhs};
   }
 
-  auto operator<=(bool value) -> ExprLhs<bool> {
+  auto operator<=(bool value) -> ExprLhs<bool>
+  {
     return ExprLhs<bool>{value};
   }
 };
@@ -2444,7 +2591,8 @@ struct IGeneratorTracker;
     struct BenchmarkStats;
 #endif // CATCH_CONFIG_ENABLE_BENCHMARKING
 
-struct IResultCapture {
+struct IResultCapture
+{
 
   virtual ~IResultCapture();
 
@@ -2507,12 +2655,15 @@ IResultCapture &getResultCapture();
 // end catch_interfaces_capture.h
 namespace Catch {
 
-struct TestFailureException {};
+struct TestFailureException
+{
+};
 struct AssertionResultData;
 struct IResultCapture;
 class RunContext;
 
-class LazyExpression {
+class LazyExpression
+{
   friend class AssertionHandler;
   friend struct AssertionStats;
   friend class RunContext;
@@ -2529,12 +2680,14 @@ public:
   friend auto operator<<(std::ostream &os, LazyExpression const &lazyExpr) -> std::ostream &;
 };
 
-struct AssertionReaction {
+struct AssertionReaction
+{
   bool shouldDebugBreak = false;
   bool shouldThrow = false;
 };
 
-class AssertionHandler {
+class AssertionHandler
+{
   AssertionInfo m_assertionInfo;
   AssertionReaction m_reaction;
   bool m_completed = false;
@@ -2546,14 +2699,16 @@ public:
        SourceLineInfo const &lineInfo,
        StringRef capturedExpression,
        ResultDisposition::Flags resultDisposition);
-  ~AssertionHandler() {
+  ~AssertionHandler()
+  {
     if (!m_completed) {
       m_resultCapture.handleIncomplete(m_assertionInfo);
     }
   }
 
   template<typename T>
-  void handleExpr(ExprLhs<T> const &expr) {
+  void handleExpr(ExprLhs<T> const &expr)
+  {
     handleExpr(expr.makeUnaryExpr());
   }
   void handleExpr(ITransientExpression const &expr);
@@ -2587,7 +2742,8 @@ void handleExceptionMatchExpr(AssertionHandler &handler,
 
 namespace Catch {
 
-struct MessageInfo {
+struct MessageInfo
+{
   MessageInfo(StringRef const &_macroName,
               SourceLineInfo const &_lineInfo,
               ResultWas::OfType _type);
@@ -2604,10 +2760,12 @@ private:
   static unsigned int globalCount;
 };
 
-struct MessageStream {
+struct MessageStream
+{
 
   template<typename T>
-  MessageStream &operator<<(T const &value) {
+  MessageStream &operator<<(T const &value)
+  {
     m_stream << value;
     return *this;
   }
@@ -2615,13 +2773,15 @@ struct MessageStream {
   ReusableStringStream m_stream;
 };
 
-struct MessageBuilder : MessageStream {
+struct MessageBuilder : MessageStream
+{
   MessageBuilder(StringRef const &macroName,
                  SourceLineInfo const &lineInfo,
                  ResultWas::OfType type);
 
   template<typename T>
-  MessageBuilder &operator<<(T const &value) {
+  MessageBuilder &operator<<(T const &value)
+  {
     m_stream << value;
     return *this;
   }
@@ -2629,7 +2789,8 @@ struct MessageBuilder : MessageStream {
   MessageInfo m_info;
 };
 
-class ScopedMessage {
+class ScopedMessage
+{
 public:
   explicit ScopedMessage(MessageBuilder const &builder);
   ScopedMessage(ScopedMessage &duplicate) = delete;
@@ -2640,7 +2801,8 @@ public:
   bool m_moved;
 };
 
-class Capturer {
+class Capturer
+{
   std::vector<MessageInfo> m_messages;
   IResultCapture &m_resultCapture = getResultCapture();
   size_t m_captured = 0;
@@ -2654,12 +2816,14 @@ public:
   void captureValue(size_t index, std::string const &value);
 
   template<typename T>
-  void captureValues(size_t index, T const &value) {
+  void captureValues(size_t index, T const &value)
+  {
     captureValue(index, Catch::Detail::stringify(value));
   }
 
   template<typename T, typename... Ts>
-  void captureValues(size_t index, T const &value, Ts const &... values) {
+  void captureValues(size_t index, T const &value, Ts const &... values)
+  {
     captureValue(index, Catch::Detail::stringify(value));
     captureValues(index + 1, values...);
   }
@@ -2819,7 +2983,8 @@ public:
 
 namespace Catch {
 
-struct Counts {
+struct Counts
+{
   Counts operator-(Counts const &other) const;
   Counts &operator+=(Counts const &other);
 
@@ -2832,7 +2997,8 @@ struct Counts {
   std::size_t failedButOk = 0;
 };
 
-struct Totals {
+struct Totals
+{
 
   Totals operator-(Totals const &other) const;
   Totals &operator+=(Totals const &other);
@@ -2850,7 +3016,8 @@ struct Totals {
 
 namespace Catch {
 
-struct SectionInfo {
+struct SectionInfo
+{
   SectionInfo
       (SourceLineInfo const &_lineInfo,
        std::string const &_name);
@@ -2859,14 +3026,16 @@ struct SectionInfo {
   SectionInfo
       (SourceLineInfo const &_lineInfo,
        std::string const &_name,
-       std::string const &) : SectionInfo(_lineInfo, _name) {}
+       std::string const &) : SectionInfo(_lineInfo, _name)
+  {}
 
   std::string name;
   std::string description; // !Deprecated: this will always be empty
   SourceLineInfo lineInfo;
 };
 
-struct SectionEndInfo {
+struct SectionEndInfo
+{
   SectionInfo sectionInfo;
   Counts prevAssertions;
   double durationInSeconds;
@@ -2884,7 +3053,8 @@ namespace Catch {
 auto getCurrentNanosecondsSinceEpoch() -> uint64_t;
 auto getEstimatedClockResolution() -> uint64_t;
 
-class Timer {
+class Timer
+{
   uint64_t m_nanoseconds = 0;
 public:
   void start();
@@ -2901,7 +3071,8 @@ public:
 
 namespace Catch {
 
-class Section : NonCopyable {
+class Section : NonCopyable
+{
 public:
   Section(SectionInfo const &info);
   ~Section();
@@ -2953,7 +3124,8 @@ class StartupExceptionRegistry;
 
 using IReporterFactoryPtr = std::shared_ptr<IReporterFactory>;
 
-struct IRegistryHub {
+struct IRegistryHub
+{
   virtual ~IRegistryHub();
 
   virtual IReporterRegistry const &getReporterRegistry() const = 0;
@@ -2964,7 +3136,8 @@ struct IRegistryHub {
   virtual StartupExceptionRegistry const &getStartupExceptionRegistry() const = 0;
 };
 
-struct IMutableRegistryHub {
+struct IMutableRegistryHub
+{
   virtual ~IMutableRegistryHub();
   virtual void registerReporter(std::string const &name, IReporterFactoryPtr const &factory) = 0;
   virtual void registerListener(IReporterFactoryPtr const &factory) = 0;
@@ -3000,28 +3173,34 @@ using exceptionTranslateFunction = std::string(*)();
 struct IExceptionTranslator;
 using ExceptionTranslators = std::vector<std::unique_ptr<IExceptionTranslator const>>;
 
-struct IExceptionTranslator {
+struct IExceptionTranslator
+{
   virtual ~IExceptionTranslator();
   virtual std::string translate(ExceptionTranslators::const_iterator it,
                                 ExceptionTranslators::const_iterator itEnd) const = 0;
 };
 
-struct IExceptionTranslatorRegistry {
+struct IExceptionTranslatorRegistry
+{
   virtual ~IExceptionTranslatorRegistry();
 
   virtual std::string translateActiveException() const = 0;
 };
 
-class ExceptionTranslatorRegistrar {
+class ExceptionTranslatorRegistrar
+{
   template<typename T>
-  class ExceptionTranslator : public IExceptionTranslator {
+  class ExceptionTranslator : public IExceptionTranslator
+  {
   public:
 
     ExceptionTranslator(std::string(*translateFunction)(T &))
-        : m_translateFunction(translateFunction) {}
+        : m_translateFunction(translateFunction)
+    {}
 
     std::string translate(ExceptionTranslators::const_iterator it,
-                          ExceptionTranslators::const_iterator itEnd) const override {
+                          ExceptionTranslators::const_iterator itEnd) const override
+    {
       try {
         if (it == itEnd)
           std::rethrow_exception(std::current_exception());
@@ -3039,7 +3218,8 @@ class ExceptionTranslatorRegistrar {
 
 public:
   template<typename T>
-  ExceptionTranslatorRegistrar(std::string(*translateFunction)(T &)) {
+  ExceptionTranslatorRegistrar(std::string(*translateFunction)(T &))
+  {
     getMutableRegistryHub().registerTranslator
         (new ExceptionTranslator<T>(translateFunction));
   }
@@ -3064,7 +3244,8 @@ public:
 namespace Catch {
 namespace Detail {
 
-class Approx {
+class Approx
+{
 private:
   bool equalityComparisonImpl(double other) const;
   // Validates the new margin (margin >= 0)
@@ -3083,7 +3264,8 @@ public:
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  Approx operator()(T const &value) {
+  Approx operator()(T const &value)
+  {
     Approx approx(static_cast<double>(value));
     approx.m_epsilon = m_epsilon;
     approx.m_margin = m_margin;
@@ -3093,60 +3275,70 @@ public:
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  explicit Approx(T const &value): Approx(static_cast<double>(value)) {}
+  explicit Approx(T const &value): Approx(static_cast<double>(value))
+  {}
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator==(const T &lhs, Approx const &rhs) {
+  friend bool operator==(const T &lhs, Approx const &rhs)
+  {
     auto lhs_v = static_cast<double>(lhs);
     return rhs.equalityComparisonImpl(lhs_v);
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator==(Approx const &lhs, const T &rhs) {
+  friend bool operator==(Approx const &lhs, const T &rhs)
+  {
     return operator==(rhs, lhs);
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator!=(T const &lhs, Approx const &rhs) {
+  friend bool operator!=(T const &lhs, Approx const &rhs)
+  {
     return !operator==(lhs, rhs);
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator!=(Approx const &lhs, T const &rhs) {
+  friend bool operator!=(Approx const &lhs, T const &rhs)
+  {
     return !operator==(rhs, lhs);
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator<=(T const &lhs, Approx const &rhs) {
+  friend bool operator<=(T const &lhs, Approx const &rhs)
+  {
     return static_cast<double>(lhs) < rhs.m_value || lhs == rhs;
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator<=(Approx const &lhs, T const &rhs) {
+  friend bool operator<=(Approx const &lhs, T const &rhs)
+  {
     return lhs.m_value < static_cast<double>(rhs) || lhs == rhs;
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator>=(T const &lhs, Approx const &rhs) {
+  friend bool operator>=(T const &lhs, Approx const &rhs)
+  {
     return static_cast<double>(lhs) > rhs.m_value || lhs == rhs;
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  friend bool operator>=(Approx const &lhs, T const &rhs) {
+  friend bool operator>=(Approx const &lhs, T const &rhs)
+  {
     return lhs.m_value > static_cast<double>(rhs) || lhs == rhs;
   }
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  Approx &epsilon(T const &newEpsilon) {
+  Approx &epsilon(T const &newEpsilon)
+  {
     double epsilonAsDouble = static_cast<double>(newEpsilon);
     setEpsilon(epsilonAsDouble);
     return *this;
@@ -3154,7 +3346,8 @@ public:
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  Approx &margin(T const &newMargin) {
+  Approx &margin(T const &newMargin)
+  {
     double marginAsDouble = static_cast<double>(newMargin);
     setMargin(marginAsDouble);
     return *this;
@@ -3162,7 +3355,8 @@ public:
 
   template<typename T, typename = typename std::enable_if<std::is_constructible<double,
                                                                                 T>::value>::type>
-  Approx &scale(T const &newScale) {
+  Approx &scale(T const &newScale)
+  {
     m_scale = static_cast<double>(newScale);
     return *this;
   }
@@ -3183,7 +3377,8 @@ Detail::Approx operator "" _a(unsigned long long val);
 } // end namespace literals
 
 template<>
-struct StringMaker<Catch::Detail::Approx> {
+struct StringMaker<Catch::Detail::Approx>
+{
   static std::string convert(Catch::Detail::Approx const &value);
 };
 
@@ -3211,7 +3406,8 @@ std::string trim(std::string const &str);
 std::vector<StringRef> splitStringRef(StringRef str, char delimiter);
 bool replaceInPlace(std::string &str, std::string const &replaceThis, std::string const &withThis);
 
-struct pluralise {
+struct pluralise
+{
   pluralise(std::size_t count, std::string const &label);
 
   friend std::ostream &operator<<(std::ostream &os, pluralise const &pluraliser);
@@ -3238,7 +3434,8 @@ template<typename ArgT> struct MatchAllOf;
 template<typename ArgT> struct MatchAnyOf;
 template<typename ArgT> struct MatchNotOf;
 
-class MatcherUntypedBase {
+class MatcherUntypedBase
+{
 public:
   MatcherUntypedBase() = default;
   MatcherUntypedBase(MatcherUntypedBase const &) = default;
@@ -3257,7 +3454,8 @@ protected:
 #endif
 
 template<typename ObjectT>
-struct MatcherMethod {
+struct MatcherMethod
+{
   virtual bool match(ObjectT const &arg) const = 0;
 };
 
@@ -3275,7 +3473,8 @@ struct MatcherMethod {
 #endif
 
 template<typename T>
-struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
+struct MatcherBase : MatcherUntypedBase, MatcherMethod<T>
+{
 
   MatchAllOf<T> operator&&(MatcherBase const &other) const;
   MatchAnyOf<T> operator||(MatcherBase const &other) const;
@@ -3283,15 +3482,18 @@ struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
 };
 
 template<typename ArgT>
-struct MatchAllOf : MatcherBase<ArgT> {
-  bool match(ArgT const &arg) const override {
+struct MatchAllOf : MatcherBase<ArgT>
+{
+  bool match(ArgT const &arg) const override
+  {
     for (auto matcher : m_matchers) {
       if (!matcher->match(arg))
         return false;
     }
     return true;
   }
-  std::string describe() const override {
+  std::string describe() const override
+  {
     std::string description;
     description.reserve(4 + m_matchers.size() * 32);
     description += "( ";
@@ -3307,7 +3509,8 @@ struct MatchAllOf : MatcherBase<ArgT> {
     return description;
   }
 
-  MatchAllOf<ArgT> &operator&&(MatcherBase<ArgT> const &other) {
+  MatchAllOf<ArgT> &operator&&(MatcherBase<ArgT> const &other)
+  {
     m_matchers.push_back(&other);
     return *this;
   }
@@ -3315,16 +3518,19 @@ struct MatchAllOf : MatcherBase<ArgT> {
   std::vector<MatcherBase<ArgT> const *> m_matchers;
 };
 template<typename ArgT>
-struct MatchAnyOf : MatcherBase<ArgT> {
+struct MatchAnyOf : MatcherBase<ArgT>
+{
 
-  bool match(ArgT const &arg) const override {
+  bool match(ArgT const &arg) const override
+  {
     for (auto matcher : m_matchers) {
       if (matcher->match(arg))
         return true;
     }
     return false;
   }
-  std::string describe() const override {
+  std::string describe() const override
+  {
     std::string description;
     description.reserve(4 + m_matchers.size() * 32);
     description += "( ";
@@ -3340,7 +3546,8 @@ struct MatchAnyOf : MatcherBase<ArgT> {
     return description;
   }
 
-  MatchAnyOf<ArgT> &operator||(MatcherBase<ArgT> const &other) {
+  MatchAnyOf<ArgT> &operator||(MatcherBase<ArgT> const &other)
+  {
     m_matchers.push_back(&other);
     return *this;
   }
@@ -3349,30 +3556,37 @@ struct MatchAnyOf : MatcherBase<ArgT> {
 };
 
 template<typename ArgT>
-struct MatchNotOf : MatcherBase<ArgT> {
+struct MatchNotOf : MatcherBase<ArgT>
+{
 
-  MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher) : m_underlyingMatcher(underlyingMatcher) {}
+  MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher) : m_underlyingMatcher(underlyingMatcher)
+  {}
 
-  bool match(ArgT const &arg) const override {
+  bool match(ArgT const &arg) const override
+  {
     return !m_underlyingMatcher.match(arg);
   }
 
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "not " + m_underlyingMatcher.toString();
   }
   MatcherBase<ArgT> const &m_underlyingMatcher;
 };
 
 template<typename T>
-MatchAllOf<T> MatcherBase<T>::operator&&(MatcherBase const &other) const {
+MatchAllOf<T> MatcherBase<T>::operator&&(MatcherBase const &other) const
+{
   return MatchAllOf<T>() && *this && other;
 }
 template<typename T>
-MatchAnyOf<T> MatcherBase<T>::operator||(MatcherBase const &other) const {
+MatchAnyOf<T> MatcherBase<T>::operator||(MatcherBase const &other) const
+{
   return MatchAnyOf<T>() || *this || other;
 }
 template<typename T>
-MatchNotOf<T> MatcherBase<T>::operator!() const {
+MatchNotOf<T> MatcherBase<T>::operator!() const
+{
   return MatchNotOf<T>(*this);
 }
 
@@ -3398,7 +3612,8 @@ namespace Floating {
 
 enum class FloatingPointKind : uint8_t;
 
-struct WithinAbsMatcher : MatcherBase<double> {
+struct WithinAbsMatcher : MatcherBase<double>
+{
   WithinAbsMatcher(double target, double margin);
   bool match(double const &matchee) const override;
   std::string describe() const override;
@@ -3407,7 +3622,8 @@ private:
   double m_margin;
 };
 
-struct WithinUlpsMatcher : MatcherBase<double> {
+struct WithinUlpsMatcher : MatcherBase<double>
+{
   WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType);
   bool match(double const &matchee) const override;
   std::string describe() const override;
@@ -3443,20 +3659,24 @@ std::string finalizeDescription(const std::string &desc);
 }
 
 template<typename T>
-class PredicateMatcher : public MatcherBase<T> {
+class PredicateMatcher : public MatcherBase<T>
+{
   std::function<bool(T const &)> m_predicate;
   std::string m_description;
 public:
 
   PredicateMatcher(std::function<bool(T const &)> const &elem, std::string const &descr)
       : m_predicate(std::move(elem)),
-        m_description(Detail::finalizeDescription(descr)) {}
+        m_description(Detail::finalizeDescription(descr))
+  {}
 
-  bool match(T const &item) const override {
+  bool match(T const &item) const override
+  {
     return m_predicate(item);
   }
 
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return m_description;
   }
 };
@@ -3469,7 +3689,8 @@ public:
 // requires a lot of TMP.
 template<typename T>
 Generic::PredicateMatcher<T> Predicate(std::function<bool(T const &)> const &predicate,
-                                       std::string const &description = "") {
+                                       std::string const &description = "")
+{
   return Generic::PredicateMatcher<T>(predicate, description);
 }
 
@@ -3486,7 +3707,8 @@ namespace Matchers {
 
 namespace StdString {
 
-struct CasedString {
+struct CasedString
+{
   CasedString(std::string const &str, CaseSensitive::Choice caseSensitivity);
   std::string adjustString(std::string const &str) const;
   std::string caseSensitivitySuffix() const;
@@ -3495,7 +3717,8 @@ struct CasedString {
   std::string m_str;
 };
 
-struct StringMatcherBase : MatcherBase<std::string> {
+struct StringMatcherBase : MatcherBase<std::string>
+{
   StringMatcherBase(std::string const &operation, CasedString const &comparator);
   std::string describe() const override;
 
@@ -3503,24 +3726,29 @@ struct StringMatcherBase : MatcherBase<std::string> {
   std::string m_operation;
 };
 
-struct EqualsMatcher : StringMatcherBase {
+struct EqualsMatcher : StringMatcherBase
+{
   EqualsMatcher(CasedString const &comparator);
   bool match(std::string const &source) const override;
 };
-struct ContainsMatcher : StringMatcherBase {
+struct ContainsMatcher : StringMatcherBase
+{
   ContainsMatcher(CasedString const &comparator);
   bool match(std::string const &source) const override;
 };
-struct StartsWithMatcher : StringMatcherBase {
+struct StartsWithMatcher : StringMatcherBase
+{
   StartsWithMatcher(CasedString const &comparator);
   bool match(std::string const &source) const override;
 };
-struct EndsWithMatcher : StringMatcherBase {
+struct EndsWithMatcher : StringMatcherBase
+{
   EndsWithMatcher(CasedString const &comparator);
   bool match(std::string const &source) const override;
 };
 
-struct RegexMatcher : MatcherBase<std::string> {
+struct RegexMatcher : MatcherBase<std::string>
+{
   RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity);
   bool match(std::string const &matchee) const override;
   std::string describe() const override;
@@ -3559,11 +3787,14 @@ namespace Matchers {
 
 namespace Vector {
 template<typename T>
-struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
+struct ContainsElementMatcher : MatcherBase<std::vector<T>>
+{
 
-  ContainsElementMatcher(T const &comparator) : m_comparator(comparator) {}
+  ContainsElementMatcher(T const &comparator) : m_comparator(comparator)
+  {}
 
-  bool match(std::vector<T> const &v) const override {
+  bool match(std::vector<T> const &v) const override
+  {
     for (auto const &el : v) {
       if (el == m_comparator) {
         return true;
@@ -3572,7 +3803,8 @@ struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
     return false;
   }
 
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "Contains: " + ::Catch::Detail::stringify(m_comparator);
   }
 
@@ -3580,11 +3812,14 @@ struct ContainsElementMatcher : MatcherBase<std::vector<T>> {
 };
 
 template<typename T>
-struct ContainsMatcher : MatcherBase<std::vector<T>> {
+struct ContainsMatcher : MatcherBase<std::vector<T>>
+{
 
-  ContainsMatcher(std::vector<T> const &comparator) : m_comparator(comparator) {}
+  ContainsMatcher(std::vector<T> const &comparator) : m_comparator(comparator)
+  {}
 
-  bool match(std::vector<T> const &v) const override {
+  bool match(std::vector<T> const &v) const override
+  {
     // !TBD: see note in EqualsMatcher
     if (m_comparator.size() > v.size())
       return false;
@@ -3602,7 +3837,8 @@ struct ContainsMatcher : MatcherBase<std::vector<T>> {
     }
     return true;
   }
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "Contains: " + ::Catch::Detail::stringify(m_comparator);
   }
 
@@ -3610,11 +3846,14 @@ struct ContainsMatcher : MatcherBase<std::vector<T>> {
 };
 
 template<typename T>
-struct EqualsMatcher : MatcherBase<std::vector<T>> {
+struct EqualsMatcher : MatcherBase<std::vector<T>>
+{
 
-  EqualsMatcher(std::vector<T> const &comparator) : m_comparator(comparator) {}
+  EqualsMatcher(std::vector<T> const &comparator) : m_comparator(comparator)
+  {}
 
-  bool match(std::vector<T> const &v) const override {
+  bool match(std::vector<T> const &v) const override
+  {
     // !TBD: This currently works if all elements can be compared using !=
     // - a more general approach would be via a compare template that defaults
     // to using !=. but could be specialised for, e.g. std::vector<T> etc
@@ -3626,18 +3865,22 @@ struct EqualsMatcher : MatcherBase<std::vector<T>> {
         return false;
     return true;
   }
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "Equals: " + ::Catch::Detail::stringify(m_comparator);
   }
   std::vector<T> const &m_comparator;
 };
 
 template<typename T>
-struct ApproxMatcher : MatcherBase<std::vector<T>> {
+struct ApproxMatcher : MatcherBase<std::vector<T>>
+{
 
-  ApproxMatcher(std::vector<T> const &comparator) : m_comparator(comparator) {}
+  ApproxMatcher(std::vector<T> const &comparator) : m_comparator(comparator)
+  {}
 
-  bool match(std::vector<T> const &v) const override {
+  bool match(std::vector<T> const &v) const override
+  {
     if (m_comparator.size() != v.size())
       return false;
     for (std::size_t i = 0; i < v.size(); ++i)
@@ -3645,21 +3888,25 @@ struct ApproxMatcher : MatcherBase<std::vector<T>> {
         return false;
     return true;
   }
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "is approx: " + ::Catch::Detail::stringify(m_comparator);
   }
   template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
-  ApproxMatcher &epsilon(T const &newEpsilon) {
+  ApproxMatcher &epsilon(T const &newEpsilon)
+  {
     approx.epsilon(newEpsilon);
     return *this;
   }
   template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
-  ApproxMatcher &margin(T const &newMargin) {
+  ApproxMatcher &margin(T const &newMargin)
+  {
     approx.margin(newMargin);
     return *this;
   }
   template<typename = typename std::enable_if<std::is_constructible<double, T>::value>::type>
-  ApproxMatcher &scale(T const &newScale) {
+  ApproxMatcher &scale(T const &newScale)
+  {
     approx.scale(newScale);
     return *this;
   }
@@ -3669,9 +3916,12 @@ struct ApproxMatcher : MatcherBase<std::vector<T>> {
 };
 
 template<typename T>
-struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
-  UnorderedEqualsMatcher(std::vector<T> const &target) : m_target(target) {}
-  bool match(std::vector<T> const &vec) const override {
+struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>>
+{
+  UnorderedEqualsMatcher(std::vector<T> const &target) : m_target(target)
+  {}
+  bool match(std::vector<T> const &vec) const override
+  {
     // Note: This is a reimplementation of std::is_permutation,
     //       because I don't want to include <algorithm> inside the common path
     if (m_target.size() != vec.size()) {
@@ -3680,7 +3930,8 @@ struct UnorderedEqualsMatcher : MatcherBase<std::vector<T>> {
     return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
   }
 
-  std::string describe() const override {
+  std::string describe() const override
+  {
     return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target);
   }
 private:
@@ -3693,27 +3944,32 @@ private:
 // This allows the types to be inferred
 
 template<typename T>
-Vector::ContainsMatcher<T> Contains(std::vector<T> const &comparator) {
+Vector::ContainsMatcher<T> Contains(std::vector<T> const &comparator)
+{
   return Vector::ContainsMatcher<T>(comparator);
 }
 
 template<typename T>
-Vector::ContainsElementMatcher<T> VectorContains(T const &comparator) {
+Vector::ContainsElementMatcher<T> VectorContains(T const &comparator)
+{
   return Vector::ContainsElementMatcher<T>(comparator);
 }
 
 template<typename T>
-Vector::EqualsMatcher<T> Equals(std::vector<T> const &comparator) {
+Vector::EqualsMatcher<T> Equals(std::vector<T> const &comparator)
+{
   return Vector::EqualsMatcher<T>(comparator);
 }
 
 template<typename T>
-Vector::ApproxMatcher<T> Approx(std::vector<T> const &comparator) {
+Vector::ApproxMatcher<T> Approx(std::vector<T> const &comparator)
+{
   return Vector::ApproxMatcher<T>(comparator);
 }
 
 template<typename T>
-Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const &target) {
+Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const &target)
+{
   return Vector::UnorderedEqualsMatcher<T>(target);
 }
 
@@ -3724,7 +3980,8 @@ Vector::UnorderedEqualsMatcher<T> UnorderedEquals(std::vector<T> const &target)
 namespace Catch {
 
 template<typename ArgT, typename MatcherT>
-class MatchExpr : public ITransientExpression {
+class MatchExpr : public ITransientExpression
+{
   ArgT const &m_arg;
   MatcherT m_matcher;
   StringRef m_matcherString;
@@ -3733,9 +3990,11 @@ public:
       : ITransientExpression{true, matcher.match(arg)},
         m_arg(arg),
         m_matcher(matcher),
-        m_matcherString(matcherString) {}
+        m_matcherString(matcherString)
+  {}
 
-  void streamReconstructedExpression(std::ostream &os) const override {
+  void streamReconstructedExpression(std::ostream &os) const override
+  {
     auto matcherAsString = m_matcher.toString();
     os << Catch::Detail::stringify(m_arg) << ' ';
     if (matcherAsString == Detail::unprintableString)
@@ -3754,7 +4013,8 @@ void handleExceptionMatchExpr(AssertionHandler &handler,
 template<typename ArgT, typename MatcherT>
 auto makeMatchExpr(ArgT const &arg,
                    MatcherT const &matcher,
-                   StringRef const &matcherString) -> MatchExpr<ArgT, MatcherT> {
+                   StringRef const &matcherString) -> MatchExpr<ArgT, MatcherT>
+{
   return MatchExpr<ArgT, MatcherT>(arg, matcher, matcherString);
 }
 
@@ -3802,7 +4062,8 @@ auto makeMatchExpr(ArgT const &arg,
 namespace Catch {
 
 namespace Generators {
-class GeneratorUntypedBase {
+class GeneratorUntypedBase
+{
 public:
   GeneratorUntypedBase() = default;
   virtual ~GeneratorUntypedBase();
@@ -3816,7 +4077,8 @@ using GeneratorBasePtr = std::unique_ptr<GeneratorUntypedBase>;
 
 } // namespace Generators
 
-struct IGeneratorTracker {
+struct IGeneratorTracker
+{
   virtual ~IGeneratorTracker();
   virtual auto hasGenerator() const -> bool = 0;
   virtual auto getGenerator() const -> Generators::GeneratorBasePtr const & = 0;
@@ -3834,7 +4096,8 @@ namespace Catch {
 #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
 template<typename Ex>
 [[noreturn]]
-void throw_exception(Ex const &e) {
+void throw_exception(Ex const &e)
+{
   throw e;
 }
 #else // ^^ Exceptions are enabled //  Exceptions are disabled vv
@@ -3876,12 +4139,14 @@ void throw_runtime_error(std::string const &msg);
 
 namespace Catch {
 
-class GeneratorException : public std::exception {
+class GeneratorException : public std::exception
+{
   const char *const m_msg = "";
 
 public:
   GeneratorException(const char *msg) :
-      m_msg(msg) {}
+      m_msg(msg)
+  {}
 
   const char *what() const noexcept override final;
 };
@@ -3891,13 +4156,15 @@ namespace Generators {
 // !TBD move this into its own location?
 namespace pf {
 template<typename T, typename... Args>
-std::unique_ptr<T> make_unique(Args &&... args) {
+std::unique_ptr<T> make_unique(Args &&... args)
+{
   return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
 }
 }
 
 template<typename T>
-struct IGenerator : GeneratorUntypedBase {
+struct IGenerator : GeneratorUntypedBase
+{
   virtual ~IGenerator() = default;
 
   // Returns the current element of the generator
@@ -3909,95 +4176,118 @@ struct IGenerator : GeneratorUntypedBase {
 };
 
 template<typename T>
-class SingleValueGenerator final : public IGenerator<T> {
+class SingleValueGenerator final : public IGenerator<T>
+{
   T m_value;
 public:
-  SingleValueGenerator(T const &value) : m_value(value) {}
-  SingleValueGenerator(T &&value) : m_value(std::move(value)) {}
+  SingleValueGenerator(T const &value) : m_value(value)
+  {}
+  SingleValueGenerator(T &&value) : m_value(std::move(value))
+  {}
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_value;
   }
-  bool next() override {
+  bool next() override
+  {
     return false;
   }
 };
 
 template<typename T>
-class FixedValuesGenerator final : public IGenerator<T> {
+class FixedValuesGenerator final : public IGenerator<T>
+{
   static_assert(!std::is_same<T, bool>::value,
                 "ValuesGenerator does not support bools because of std::vector<bool>"
                 "specialization, use SingleValue Generator instead.");
   std::vector<T> m_values;
   size_t m_idx = 0;
 public:
-  FixedValuesGenerator(std::initializer_list<T> values) : m_values(values) {}
+  FixedValuesGenerator(std::initializer_list<T> values) : m_values(values)
+  {}
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_values[m_idx];
   }
-  bool next() override {
+  bool next() override
+  {
     ++m_idx;
     return m_idx < m_values.size();
   }
 };
 
 template<typename T>
-class GeneratorWrapper final {
+class GeneratorWrapper final
+{
   std::unique_ptr<IGenerator<T>> m_generator;
 public:
   GeneratorWrapper(std::unique_ptr<IGenerator<T>> generator) :
-      m_generator(std::move(generator)) {}
-  T const &get() const {
+      m_generator(std::move(generator))
+  {}
+  T const &get() const
+  {
     return m_generator->get();
   }
-  bool next() {
+  bool next()
+  {
     return m_generator->next();
   }
 };
 
 template<typename T>
-GeneratorWrapper<T> value(T &&value) {
+GeneratorWrapper<T> value(T &&value)
+{
   return GeneratorWrapper<T>(pf::make_unique<SingleValueGenerator<T>>(std::forward<T>(value)));
 }
 template<typename T>
-GeneratorWrapper<T> values(std::initializer_list<T> values) {
+GeneratorWrapper<T> values(std::initializer_list<T> values)
+{
   return GeneratorWrapper<T>(pf::make_unique<FixedValuesGenerator<T>>(values));
 }
 
 template<typename T>
-class Generators : public IGenerator<T> {
+class Generators : public IGenerator<T>
+{
   std::vector<GeneratorWrapper<T>> m_generators;
   size_t m_current = 0;
 
-  void populate(GeneratorWrapper<T> &&generator) {
+  void populate(GeneratorWrapper<T> &&generator)
+  {
     m_generators.emplace_back(std::move(generator));
   }
-  void populate(T &&val) {
+  void populate(T &&val)
+  {
     m_generators.emplace_back(value(std::move(val)));
   }
   template<typename U>
-  void populate(U &&val) {
+  void populate(U &&val)
+  {
     populate(T(std::move(val)));
   }
   template<typename U, typename... Gs>
-  void populate(U &&valueOrGenerator, Gs... moreGenerators) {
+  void populate(U &&valueOrGenerator, Gs... moreGenerators)
+  {
     populate(std::forward<U>(valueOrGenerator));
     populate(std::forward<Gs>(moreGenerators)...);
   }
 
 public:
   template<typename... Gs>
-  Generators(Gs... moreGenerators) {
+  Generators(Gs... moreGenerators)
+  {
     m_generators.reserve(sizeof...(Gs));
     populate(std::forward<Gs>(moreGenerators)...);
   }
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_generators[m_current].get();
   }
 
-  bool next() override {
+  bool next() override
+  {
     if (m_current >= m_generators.size()) {
       return false;
     }
@@ -4010,28 +4300,35 @@ public:
 };
 
 template<typename... Ts>
-GeneratorWrapper<std::tuple<Ts...>> table(std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples) {
+GeneratorWrapper<std::tuple<Ts...>> table(std::initializer_list<std::tuple<typename std::decay<Ts>::type...>> tuples)
+{
   return values<std::tuple<Ts...>>(tuples);
 }
 
 // Tag type to signal that a generator sequence should convert arguments to a specific type
 template<typename T>
-struct as {};
+struct as
+{
+};
 
 template<typename T, typename... Gs>
-auto makeGenerators(GeneratorWrapper<T> &&generator, Gs... moreGenerators) -> Generators<T> {
+auto makeGenerators(GeneratorWrapper<T> &&generator, Gs... moreGenerators) -> Generators<T>
+{
   return Generators<T>(std::move(generator), std::forward<Gs>(moreGenerators)...);
 }
 template<typename T>
-auto makeGenerators(GeneratorWrapper<T> &&generator) -> Generators<T> {
+auto makeGenerators(GeneratorWrapper<T> &&generator) -> Generators<T>
+{
   return Generators<T>(std::move(generator));
 }
 template<typename T, typename... Gs>
-auto makeGenerators(T &&val, Gs... moreGenerators) -> Generators<T> {
+auto makeGenerators(T &&val, Gs... moreGenerators) -> Generators<T>
+{
   return makeGenerators(value(std::forward<T>(val)), std::forward<Gs>(moreGenerators)...);
 }
 template<typename T, typename U, typename... Gs>
-auto makeGenerators(as<T>, U &&val, Gs... moreGenerators) -> Generators<T> {
+auto makeGenerators(as<T>, U &&val, Gs... moreGenerators) -> Generators<T>
+{
   return makeGenerators(value(T(std::forward<U>(val))), std::forward<Gs>(moreGenerators)...);
 }
 
@@ -4043,7 +4340,8 @@ template<typename L>
 //       return type. Yeah.
 auto generate(SourceLineInfo const &lineInfo,
               L const &generatorExpression) -> decltype(std::declval<decltype(generatorExpression())>()
-    .get()) {
+    .get())
+{
   using UnderlyingType = typename decltype(generatorExpression())::type;
 
   IGeneratorTracker &tracker = acquireGeneratorTracker(lineInfo);
@@ -4072,20 +4370,24 @@ namespace Catch {
 namespace Generators {
 
 template<typename T>
-class TakeGenerator : public IGenerator<T> {
+class TakeGenerator : public IGenerator<T>
+{
   GeneratorWrapper<T> m_generator;
   size_t m_returned = 0;
   size_t m_target;
 public:
   TakeGenerator(size_t target, GeneratorWrapper<T> &&generator) :
       m_generator(std::move(generator)),
-      m_target(target) {
+      m_target(target)
+  {
     assert(target != 0 && "Empty generators are not allowed");
   }
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_generator.get();
   }
-  bool next() override {
+  bool next() override
+  {
     ++m_returned;
     if (m_returned >= m_target) {
       return false;
@@ -4102,19 +4404,22 @@ public:
 };
 
 template<typename T>
-GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T> &&generator) {
+GeneratorWrapper<T> take(size_t target, GeneratorWrapper<T> &&generator)
+{
   return GeneratorWrapper<T>(pf::make_unique<TakeGenerator<T>>(target, std::move(generator)));
 }
 
 template<typename T, typename Predicate>
-class FilterGenerator : public IGenerator<T> {
+class FilterGenerator : public IGenerator<T>
+{
   GeneratorWrapper<T> m_generator;
   Predicate m_predicate;
 public:
   template<typename P = Predicate>
   FilterGenerator(P &&pred, GeneratorWrapper<T> &&generator):
       m_generator(std::move(generator)),
-      m_predicate(std::forward<P>(pred)) {
+      m_predicate(std::forward<P>(pred))
+  {
     if (!m_predicate(m_generator.get())) {
       // It might happen that there are no values that pass the
       // filter. In that case we throw an exception.
@@ -4125,11 +4430,13 @@ public:
     }
   }
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_generator.get();
   }
 
-  bool next() override {
+  bool next() override
+  {
     bool success = m_generator.next();
     if (!success) {
       return false;
@@ -4140,7 +4447,8 @@ public:
 };
 
 template<typename T, typename Predicate>
-GeneratorWrapper<T> filter(Predicate &&pred, GeneratorWrapper<T> &&generator) {
+GeneratorWrapper<T> filter(Predicate &&pred, GeneratorWrapper<T> &&generator)
+{
   return GeneratorWrapper<T>(std::unique_ptr<IGenerator<T>>(pf::make_unique<FilterGenerator<T,
                                                                                             Predicate>>(
       std::forward<Predicate>(pred),
@@ -4148,7 +4456,8 @@ GeneratorWrapper<T> filter(Predicate &&pred, GeneratorWrapper<T> &&generator) {
 }
 
 template<typename T>
-class RepeatGenerator : public IGenerator<T> {
+class RepeatGenerator : public IGenerator<T>
+{
   static_assert(!std::is_same<T, bool>::value,
                 "RepeatGenerator currently does not support bools"
                 "because of std::vector<bool> specialization");
@@ -4160,11 +4469,13 @@ class RepeatGenerator : public IGenerator<T> {
 public:
   RepeatGenerator(size_t repeats, GeneratorWrapper<T> &&generator) :
       m_generator(std::move(generator)),
-      m_target_repeats(repeats) {
+      m_target_repeats(repeats)
+  {
     assert(m_target_repeats > 0 && "Repeat generator must repeat at least once");
   }
 
-  T const &get() const override {
+  T const &get() const override
+  {
     if (m_current_repeat == 0) {
       m_returned.push_back(m_generator.get());
       return m_returned.back();
@@ -4172,7 +4483,8 @@ public:
     return m_returned[m_repeat_index];
   }
 
-  bool next() override {
+  bool next() override
+  {
     // There are 2 basic cases:
     // 1) We are still reading the generator
     // 2) We are reading our own cache
@@ -4198,12 +4510,14 @@ public:
 };
 
 template<typename T>
-GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T> &&generator) {
+GeneratorWrapper<T> repeat(size_t repeats, GeneratorWrapper<T> &&generator)
+{
   return GeneratorWrapper<T>(pf::make_unique<RepeatGenerator<T>>(repeats, std::move(generator)));
 }
 
 template<typename T, typename U, typename Func>
-class MapGenerator : public IGenerator<T> {
+class MapGenerator : public IGenerator<T>
+{
   // TBD: provide static assert for mapping function, for friendly error message
   GeneratorWrapper<U> m_generator;
   Func m_function;
@@ -4214,12 +4528,15 @@ public:
   MapGenerator(F2 &&function, GeneratorWrapper<U> &&generator) :
       m_generator(std::move(generator)),
       m_function(std::forward<F2>(function)),
-      m_cache(m_function(m_generator.get())) {}
+      m_cache(m_function(m_generator.get()))
+  {}
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_cache;
   }
-  bool next() override {
+  bool next() override
+  {
     const auto success = m_generator.next();
     if (success) {
       m_cache = m_function(m_generator.get());
@@ -4241,28 +4558,32 @@ using MapFunctionReturnType = typename std::remove_reference<typename std::remov
 #endif
 
 template<typename Func, typename U, typename T = MapFunctionReturnType<Func, U>>
-GeneratorWrapper<T> map(Func &&function, GeneratorWrapper<U> &&generator) {
+GeneratorWrapper<T> map(Func &&function, GeneratorWrapper<U> &&generator)
+{
   return GeneratorWrapper<T>(
       pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))
   );
 }
 
 template<typename T, typename U, typename Func>
-GeneratorWrapper<T> map(Func &&function, GeneratorWrapper<U> &&generator) {
+GeneratorWrapper<T> map(Func &&function, GeneratorWrapper<U> &&generator)
+{
   return GeneratorWrapper<T>(
       pf::make_unique<MapGenerator<T, U, Func>>(std::forward<Func>(function), std::move(generator))
   );
 }
 
 template<typename T>
-class ChunkGenerator final : public IGenerator<std::vector<T>> {
+class ChunkGenerator final : public IGenerator<std::vector<T>>
+{
   std::vector<T> m_chunk;
   size_t m_chunk_size;
   GeneratorWrapper<T> m_generator;
   bool m_used_up = false;
 public:
   ChunkGenerator(size_t size, GeneratorWrapper<T> generator) :
-      m_chunk_size(size), m_generator(std::move(generator)) {
+      m_chunk_size(size), m_generator(std::move(generator))
+  {
     m_chunk.reserve(m_chunk_size);
     if (m_chunk_size != 0) {
       m_chunk.push_back(m_generator.get());
@@ -4275,10 +4596,12 @@ public:
       }
     }
   }
-  std::vector<T> const &get() const override {
+  std::vector<T> const &get() const override
+  {
     return m_chunk;
   }
-  bool next() override {
+  bool next() override
+  {
     m_chunk.clear();
     for (size_t idx = 0; idx < m_chunk_size; ++idx) {
       if (!m_generator.next()) {
@@ -4291,7 +4614,8 @@ public:
 };
 
 template<typename T>
-GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T> &&generator) {
+GeneratorWrapper<std::vector<T>> chunk(size_t size, GeneratorWrapper<T> &&generator)
+{
   return GeneratorWrapper<std::vector<T>>(
       pf::make_unique<ChunkGenerator<T>>(size, std::move(generator))
   );
@@ -4316,7 +4640,8 @@ struct IMutableContext;
 
 using IConfigPtr = std::shared_ptr<IConfig const>;
 
-struct IContext {
+struct IContext
+{
   virtual ~IContext();
 
   virtual IResultCapture *getResultCapture() = 0;
@@ -4324,7 +4649,8 @@ struct IContext {
   virtual IConfigPtr const &getConfig() const = 0;
 };
 
-struct IMutableContext : IContext {
+struct IMutableContext : IContext
+{
   virtual ~IMutableContext();
   virtual void setResultCapture(IResultCapture *resultCapture) = 0;
   virtual void setRunner(IRunner *runner) = 0;
@@ -4337,13 +4663,15 @@ private:
   static void createContext();
 };
 
-inline IMutableContext &getCurrentMutableContext() {
+inline IMutableContext &getCurrentMutableContext()
+{
   if (!IMutableContext::currentContext)
     IMutableContext::createContext();
   return *IMutableContext::currentContext;
 }
 
-inline IContext &getCurrentContext() {
+inline IContext &getCurrentContext()
+{
   return getCurrentMutableContext();
 }
 
@@ -4359,19 +4687,25 @@ namespace Catch {
 
 // An optional type
 template<typename T>
-class Option {
+class Option
+{
 public:
-  Option() : nullableValue(nullptr) {}
+  Option() : nullableValue(nullptr)
+  {}
   Option(T const &_value)
-      : nullableValue(new(storage) T(_value)) {}
+      : nullableValue(new(storage) T(_value))
+  {}
   Option(Option const &_other)
-      : nullableValue(_other ? new(storage) T(*_other) : nullptr) {}
+      : nullableValue(_other ? new(storage) T(*_other) : nullptr)
+  {}
 
-  ~Option() {
+  ~Option()
+  {
     reset();
   }
 
-  Option &operator=(Option const &_other) {
+  Option &operator=(Option const &_other)
+  {
     if (&_other != this) {
       reset();
       if (_other)
@@ -4379,32 +4713,43 @@ public:
     }
     return *this;
   }
-  Option &operator=(T const &_value) {
+  Option &operator=(T const &_value)
+  {
     reset();
     nullableValue = new(storage) T(_value);
     return *this;
   }
 
-  void reset() {
+  void reset()
+  {
     if (nullableValue)
       nullableValue->~T();
     nullableValue = nullptr;
   }
 
-  T &operator*() { return *nullableValue; }
-  T const &operator*() const { return *nullableValue; }
-  T *operator->() { return nullableValue; }
-  const T *operator->() const { return nullableValue; }
-
-  T valueOr(T const &defaultValue) const {
+  T &operator*()
+  { return *nullableValue; }
+  T const &operator*() const
+  { return *nullableValue; }
+  T *operator->()
+  { return nullableValue; }
+  const T *operator->() const
+  { return nullableValue; }
+
+  T valueOr(T const &defaultValue) const
+  {
     return nullableValue ? *nullableValue : defaultValue;
   }
 
-  bool some() const { return nullableValue != nullptr; }
-  bool none() const { return nullableValue == nullptr; }
+  bool some() const
+  { return nullableValue != nullptr; }
+  bool none() const
+  { return nullableValue == nullptr; }
 
-  bool operator!() const { return nullableValue == nullptr; }
-  explicit operator bool() const {
+  bool operator!() const
+  { return nullableValue == nullptr; }
+  explicit operator bool() const
+  {
     return some();
   }
 
@@ -4423,43 +4768,54 @@ private:
 
 namespace Catch {
 
-enum class Verbosity {
+enum class Verbosity
+{
   Quiet = 0,
   Normal,
   High
 };
 
-struct WarnAbout {
-  enum What {
+struct WarnAbout
+{
+  enum What
+  {
     Nothing = 0x00,
     NoAssertions = 0x01,
     NoTests = 0x02
   };
 };
 
-struct ShowDurations {
-  enum OrNot {
+struct ShowDurations
+{
+  enum OrNot
+  {
     DefaultForReporter,
     Always,
     Never
   };
 };
-struct RunTests {
-  enum InWhatOrder {
+struct RunTests
+{
+  enum InWhatOrder
+  {
     InDeclarationOrder,
     InLexicographicalOrder,
     InRandomOrder
   };
 };
-struct UseColour {
-  enum YesOrNo {
+struct UseColour
+{
+  enum YesOrNo
+  {
     Auto,
     Yes,
     No
   };
 };
-struct WaitForKeypress {
-  enum When {
+struct WaitForKeypress
+{
+  enum When
+  {
     Never,
     BeforeStart = 1,
     BeforeExit = 2,
@@ -4469,7 +4825,8 @@ struct WaitForKeypress {
 
 class TestSpec;
 
-struct IConfig : NonCopyable {
+struct IConfig : NonCopyable
+{
 
   virtual ~IConfig();
 
@@ -4508,7 +4865,8 @@ namespace Catch {
 namespace Generators {
 
 template<typename Float>
-class RandomFloatingGenerator final : public IGenerator<Float> {
+class RandomFloatingGenerator final : public IGenerator<Float>
+{
   // FIXME: What is the right seed?
   std::minstd_rand m_rand;
   std::uniform_real_distribution<Float> m_dist;
@@ -4517,21 +4875,25 @@ public:
 
   RandomFloatingGenerator(Float a, Float b) :
       m_rand(getCurrentContext().getConfig()->rngSeed()),
-      m_dist(a, b) {
+      m_dist(a, b)
+  {
     static_cast<void>(next());
   }
 
-  Float const &get() const override {
+  Float const &get() const override
+  {
     return m_current_number;
   }
-  bool next() override {
+  bool next() override
+  {
     m_current_number = m_dist(m_rand);
     return true;
   }
 };
 
 template<typename Integer>
-class RandomIntegerGenerator final : public IGenerator<Integer> {
+class RandomIntegerGenerator final : public IGenerator<Integer>
+{
   std::minstd_rand m_rand;
   std::uniform_int_distribution<Integer> m_dist;
   Integer m_current_number;
@@ -4539,14 +4901,17 @@ public:
 
   RandomIntegerGenerator(Integer a, Integer b) :
       m_rand(getCurrentContext().getConfig()->rngSeed()),
-      m_dist(a, b) {
+      m_dist(a, b)
+  {
     static_cast<void>(next());
   }
 
-  Integer const &get() const override {
+  Integer const &get() const override
+  {
     return m_current_number;
   }
-  bool next() override {
+  bool next() override
+  {
     m_current_number = m_dist(m_rand);
     return true;
   }
@@ -4557,7 +4922,8 @@ public:
 template<typename T>
 typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, bool>::value,
                         GeneratorWrapper<T>>::type
-random(T a, T b) {
+random(T a, T b)
+{
   return GeneratorWrapper<T>(
       pf::make_unique<RandomIntegerGenerator<T>>(a, b)
   );
@@ -4566,14 +4932,16 @@ random(T a, T b) {
 template<typename T>
 typename std::enable_if<std::is_floating_point<T>::value,
                         GeneratorWrapper<T>>::type
-random(T a, T b) {
+random(T a, T b)
+{
   return GeneratorWrapper<T>(
       pf::make_unique<RandomFloatingGenerator<T>>(a, b)
   );
 }
 
 template<typename T>
-class RangeGenerator final : public IGenerator<T> {
+class RangeGenerator final : public IGenerator<T>
+{
   T m_current;
   T m_end;
   T m_step;
@@ -4584,7 +4952,8 @@ public:
       m_current(start),
       m_end(end),
       m_step(step),
-      m_positive(m_step > T(0)) {
+      m_positive(m_step > T(0))
+  {
     assert(m_current != m_end && "Range start and end cannot be equal");
     assert(m_step != T(0) && "Step size cannot be zero");
     assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end))
@@ -4592,27 +4961,32 @@ public:
   }
 
   RangeGenerator(T const &start, T const &end) :
-      RangeGenerator(start, end, (start < end) ? T(1) : T(-1)) {}
+      RangeGenerator(start, end, (start < end) ? T(1) : T(-1))
+  {}
 
-  T const &get() const override {
+  T const &get() const override
+  {
     return m_current;
   }
 
-  bool next() override {
+  bool next() override
+  {
     m_current += m_step;
     return (m_positive) ? (m_current < m_end) : (m_current > m_end);
   }
 };
 
 template<typename T>
-GeneratorWrapper<T> range(T const &start, T const &end, T const &step) {
+GeneratorWrapper<T> range(T const &start, T const &end, T const &step)
+{
   static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value,
                 "Type must be an integer");
   return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end, step));
 }
 
 template<typename T>
-GeneratorWrapper<T> range(T const &start, T const &end) {
+GeneratorWrapper<T> range(T const &start, T const &end)
+{
   static_assert(std::is_integral<T>::value && !std::is_same<T, bool>::value,
                 "Type must be an integer");
   return GeneratorWrapper<T>(pf::make_unique<RangeGenerator<T>>(start, end));
@@ -4640,8 +5014,10 @@ namespace Catch {
 
 struct ITestInvoker;
 
-struct TestCaseInfo {
-  enum SpecialProperties {
+struct TestCaseInfo
+{
+  enum SpecialProperties
+  {
     None = 0,
     IsHidden = 1 << 1,
     ShouldFail = 1 << 2,
@@ -4675,7 +5051,8 @@ struct TestCaseInfo {
   SpecialProperties properties;
 };
 
-class TestCase : public TestCaseInfo {
+class TestCase : public TestCaseInfo
+{
 public:
 
   TestCase(ITestInvoker *testCase, TestCaseInfo &&info);
@@ -4708,7 +5085,8 @@ TestCase makeTestCase(ITestInvoker *testCase,
 
 namespace Catch {
 
-struct IRunner {
+struct IRunner
+{
   virtual ~IRunner();
   virtual bool aborting() const = 0;
 };

+ 4 - 2
src/tests/common/multithreading-tests.cpp

@@ -30,7 +30,8 @@
 
 using namespace artis::common;
 
-TEST_CASE("message queue", "multithreading") {
+TEST_CASE("message queue", "multithreading")
+{
   MessageQueue queue;
   int msg;
 
@@ -38,7 +39,8 @@ TEST_CASE("message queue", "multithreading") {
   REQUIRE(true);
 }
 
-TEST_CASE("sender", "multithreading") {
+TEST_CASE("sender", "multithreading")
+{
   Sender sender;
   int msg;
 

+ 6 - 3
src/tests/common/time-tests.cpp

@@ -34,7 +34,8 @@
 
 using namespace artis::common;
 
-TEST_CASE("double time", "common") {
+TEST_CASE("double time", "common")
+{
   artis::common::DoubleTime::type t1 = 0;
   artis::common::DoubleTime::type t2 = artis::common::DoubleTime::infinity;
 
@@ -44,7 +45,8 @@ TEST_CASE("double time", "common") {
   REQUIRE(t2 != artis::common::DoubleTime::null);
 }
 
-TEST_CASE("integer time", "common") {
+TEST_CASE("integer time", "common")
+{
   artis::common::IntegerTime::type t1 = 0;
   artis::common::IntegerTime::type t2 = artis::common::IntegerTime::infinity;
 
@@ -54,7 +56,8 @@ TEST_CASE("integer time", "common") {
   REQUIRE(t2 != artis::common::IntegerTime::null);
 }
 
-TEST_CASE("rational time", "common") {
+TEST_CASE("rational time", "common")
+{
   artis::common::RationalTime::type t1 = 0;
   artis::common::RationalTime::type t2 = artis::common::RationalTime::infinity;
 

+ 10 - 5
src/tests/devs/graph_manager.hpp

@@ -38,9 +38,11 @@ namespace tests {
 namespace devs {
 
 class FlatGraphManager :
-    public artis::devs::GraphManager<common::DoubleTime> {
+    public artis::devs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     FirstA, SecondA,
     FirstB, SecondB
   };
@@ -52,7 +54,8 @@ public:
       artis::devs::GraphManager<common::DoubleTime>(coordinator, parameters,
                                                     graph_parameters),
       a1("a1", parameters), b1("b1", parameters),
-      a2("a2", parameters), b2("b2", parameters) {
+      a2("a2", parameters), b2("b2", parameters)
+  {
     add_child(FirstA, &a1);
     add_child(FirstB, &b1);
     add_child(SecondA, &a2);
@@ -72,12 +75,14 @@ private:
   artis::devs::Simulator<common::DoubleTime, B> b2;
 };
 
-class Select {
+class Select
+{
 public:
   Select() = default;
 
   common::Model<common::DoubleTime> *
-  operator()(const common::Models<common::DoubleTime> &list) const { return list.at(0); }
+  operator()(const common::Models<common::DoubleTime> &list) const
+  { return list.at(0); }
 };
 
 }

+ 38 - 19
src/tests/devs/models.hpp

@@ -39,28 +39,34 @@ namespace artis {
 namespace tests {
 namespace devs {
 
-struct data {
+struct data
+{
   double x;
   double y;
 
   data()
-      : x(0), y(0) {}
+      : x(0), y(0)
+  {}
 
   data(double _x, double _y)
-      : x(_x), y(_y) {}
+      : x(_x), y(_y)
+  {}
 };
 
-class A : public artis::devs::Dynamics<common::DoubleTime, A> {
+class A : public artis::devs::Dynamics<common::DoubleTime, A>
+{
 public:
   A(const std::string &name,
     const artis::devs::Context<common::DoubleTime, A, artis::common::NoParameters> &context)
       :
-      artis::devs::Dynamics<common::DoubleTime, A>(name, context) {
+      artis::devs::Dynamics<common::DoubleTime, A>(name, context)
+  {
   }
 
   ~A() override = default;
 
-  void dint(typename common::DoubleTime::type t) override {
+  void dint(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -84,7 +90,8 @@ public:
 
   void
   dext(typename common::DoubleTime::type t, typename common::DoubleTime::type /* e */,
-       const common::ExternalEvent<common::DoubleTime> &msg) override {
+       const common::ExternalEvent<common::DoubleTime> &msg) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -102,7 +109,8 @@ public:
     _phase = SEND;
   }
 
-  void start(typename common::DoubleTime::type t) override {
+  void start(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -119,7 +127,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(typename common::DoubleTime::type t) const override {
+  ta(typename common::DoubleTime::type t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -140,7 +149,8 @@ public:
   }
 
   common::ExternalEvent<common::DoubleTime>
-  lambda(typename common::DoubleTime::type t) const override {
+  lambda(typename common::DoubleTime::type t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif
@@ -176,7 +186,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     WAIT, SEND
   };
 
@@ -184,18 +195,21 @@ private:
   data _value;
 };
 
-class B : public artis::devs::Dynamics<common::DoubleTime, B> {
+class B : public artis::devs::Dynamics<common::DoubleTime, B>
+{
 public:
   B(const std::string &name,
     const artis::devs::Context<common::DoubleTime, B, artis::common::NoParameters> &context)
       :
       artis::devs::Dynamics<common::DoubleTime, B>(name, context),
-      _value(0) {
+      _value(0)
+  {
   }
 
   ~B() override = default;
 
-  void dint(typename common::DoubleTime::type t) override {
+  void dint(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -215,7 +229,8 @@ public:
 
   void
   dext(typename common::DoubleTime::type t, typename common::DoubleTime::type /* e */,
-       const common::ExternalEvent<common::DoubleTime> &msg) override {
+       const common::ExternalEvent<common::DoubleTime> &msg) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -233,7 +248,8 @@ public:
     _phase = SEND;
   }
 
-  void start(typename common::DoubleTime::type t) override {
+  void start(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -250,7 +266,8 @@ public:
   }
 
   typename common::DoubleTime::type ta(
-      typename common::DoubleTime::type t) const override {
+      typename common::DoubleTime::type t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -271,7 +288,8 @@ public:
   }
 
   common::ExternalEvent<common::DoubleTime> lambda(
-      typename common::DoubleTime::type t) const override {
+      typename common::DoubleTime::type t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif
@@ -306,7 +324,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     WAIT, SEND
   };
 

+ 2 - 1
src/tests/devs/tests.cpp

@@ -36,7 +36,8 @@
 using namespace artis::tests::devs;
 using namespace artis::common;
 
-TEST_CASE("devs/flat", "run") {
+TEST_CASE("devs/flat", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::devs::Coordinator<

+ 16 - 8
src/tests/dsde/graph_manager.hpp

@@ -38,9 +38,11 @@ namespace tests {
 namespace dsde {
 
 class FlatGraphManager :
-    public artis::dsde::GraphManager<common::DoubleTime> {
+    public artis::dsde::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     BEEP = 1
   };
 
@@ -50,7 +52,8 @@ public:
       :
       artis::dsde::GraphManager<common::DoubleTime>(coordinator, parameters,
                                                     graph_parameters),
-      _beep("beep", parameters) {
+      _beep("beep", parameters)
+  {
     add_child(BEEP, &_beep);
   }
 
@@ -61,7 +64,8 @@ private:
 };
 
 class Executive :
-    public artis::dsde::Executive<common::DoubleTime, Executive> {
+    public artis::dsde::Executive<common::DoubleTime, Executive>
+{
 public:
   Executive(
       const artis::dsde::ExecutiveContext<common::DoubleTime,
@@ -73,11 +77,13 @@ public:
                                 artis::common::NoParameters> &graph_manager)
       :
       artis::dsde::Executive<common::DoubleTime, Executive>(context,
-                                                            graph_manager), _index(0), _up(true) {}
+                                                            graph_manager), _index(0), _up(true)
+  {}
 
   ~Executive() override = default;
 
-  void dint(typename common::DoubleTime::type t) override {
+  void dint(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -119,7 +125,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  start(typename common::DoubleTime::type t) override {
+  start(typename common::DoubleTime::type t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -140,7 +147,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(typename common::DoubleTime::type t) const override {
+  ta(typename common::DoubleTime::type t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif

+ 22 - 11
src/tests/dsde/models.hpp

@@ -41,26 +41,31 @@ namespace tests {
 namespace dsde {
 
 class Beep :
-    public artis::pdevs::Dynamics<common::DoubleTime, Beep> {
+    public artis::pdevs::Dynamics<common::DoubleTime, Beep>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
   Beep(const std::string &name,
        const artis::pdevs::Context<common::DoubleTime, Beep, artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, Beep>(name, context), _value(0) {
+      artis::pdevs::Dynamics<common::DoubleTime, Beep>(name, context), _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~Beep() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -83,7 +88,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type & /* e */,
-       const common::Bag <common::DoubleTime> &bag) override {
+       const common::Bag <common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -105,7 +111,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type & /* e */,
-             const common::Bag <common::DoubleTime> &bag) override {
+             const common::Bag <common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -125,7 +132,8 @@ public:
   }
 
   void
-  start(const typename common::DoubleTime::type &t) override {
+  start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -144,7 +152,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type &t) const override {
+  ta(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -167,7 +176,8 @@ public:
   }
 
   common::Bag <common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -190,7 +200,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     INIT, WAIT, SEND
   };
 

+ 2 - 1
src/tests/dsde/tests.cpp

@@ -36,7 +36,8 @@
 using namespace artis::tests::dsde;
 using namespace artis::common;
 
-TEST_CASE("dsde/flat", "run") {
+TEST_CASE("dsde/flat", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::dsde::Coordinator<

+ 12 - 6
src/tests/dtss/graph_manager.hpp

@@ -40,9 +40,11 @@ namespace dtss {
 class OnlyOneGraphManager :
     public artis::dtss::GraphManager<common::DoubleTime,
                                      artis::dtss::Parameters<common::DoubleTime>,
-                                     artis::common::NoParameters> {
+                                     artis::common::NoParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA
   };
 
@@ -54,7 +56,8 @@ public:
                                 artis::dtss::Parameters<common::DoubleTime>,
                                 artis::common::NoParameters>(
           coordinator, parameters, graph_parameters),
-      a("a", parameters) {
+      a("a", parameters)
+  {
     add_child(OneA, &a);
   }
 
@@ -67,9 +70,11 @@ private:
 class TwoGraphManager :
     public artis::dtss::GraphManager<common::DoubleTime,
                                      artis::dtss::Parameters<common::DoubleTime>,
-                                     artis::common::NoParameters> {
+                                     artis::common::NoParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
 
@@ -82,7 +87,8 @@ public:
                                 artis::common::NoParameters>(
           coordinator, parameters, graph_parameters),
       a("a", parameters),
-      b("b", parameters) {
+      b("b", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
     out({&a, A::OUT}) >> in({&b, B::IN});

+ 26 - 13
src/tests/dtss/models.hpp

@@ -40,9 +40,11 @@ namespace dtss {
 class A
     : public artis::dtss::Dynamics<artis::common::DoubleTime,
                                    A,
-                                   artis::dtss::Parameters<common::DoubleTime>> {
+                                   artis::dtss::Parameters<common::DoubleTime>>
+{
 public:
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -55,14 +57,16 @@ public:
                             A,
                             artis::dtss::Parameters<common::DoubleTime>>(
           name, context),
-      _value(0) {
+      _value(0)
+  {
     output_ports({{OUT, "out"}});
   }
 
   ~A() override = default;
 
   void transition(const artis::common::Bag<artis::common::DoubleTime> & /* x */,
-                  const artis::common::DoubleTime::type &t) override {
+                  const artis::common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -80,7 +84,8 @@ public:
 
   }
 
-  void start(const artis::common::DoubleTime::type &t) override {
+  void start(const artis::common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -98,7 +103,8 @@ public:
 
   }
 
-  artis::common::Bag<artis::common::DoubleTime> lambda(const artis::common::DoubleTime::type &t) const override {
+  artis::common::Bag<artis::common::DoubleTime> lambda(const artis::common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -129,12 +135,15 @@ private:
 class B
     : public artis::dtss::Dynamics<artis::common::DoubleTime,
                                    B,
-                                   artis::dtss::Parameters<common::DoubleTime>> {
+                                   artis::dtss::Parameters<common::DoubleTime>>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -147,7 +156,8 @@ public:
                             B,
                             artis::dtss::Parameters<common::DoubleTime>>(
           name, context),
-      _value(0) {
+      _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
@@ -155,7 +165,8 @@ public:
   ~B() override = default;
 
   void transition(const artis::common::Bag<artis::common::DoubleTime> &x,
-                  const artis::common::DoubleTime::type &t) override {
+                  const artis::common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)x;
@@ -174,7 +185,8 @@ public:
 #endif
   }
 
-  void start(const artis::common::DoubleTime::type &t) override {
+  void start(const artis::common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -193,7 +205,8 @@ public:
   }
 
   artis::common::Bag<artis::common::DoubleTime> lambda(
-      const artis::common::DoubleTime::type &t) const override {
+      const artis::common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;

+ 4 - 2
src/tests/dtss/tests.cpp

@@ -37,7 +37,8 @@
 using namespace artis::tests::dtss;
 using namespace artis::common;
 
-TEST_CASE("dtss/only_one", "run") {
+TEST_CASE("dtss/only_one", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::dtss::Parameters<DoubleTime> parameters = {1};
   artis::common::RootCoordinator<
@@ -68,7 +69,8 @@ TEST_CASE("dtss/only_one", "run") {
   }
 }
 
-TEST_CASE("dtss/two", "run") {
+TEST_CASE("dtss/two", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::dtss::Parameters<DoubleTime> parameters = {1};
   artis::common::RootCoordinator<

+ 6 - 3
src/tests/fddevs/graph_manager.hpp

@@ -38,9 +38,11 @@ namespace tests {
 namespace fddevs {
 
 class FlatGraphManager :
-    public artis::fddevs::GraphManager<common::DoubleTime> {
+    public artis::fddevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     M_BEEP, M_CRC, M_MXR,
   };
 
@@ -49,7 +51,8 @@ public:
                    const artis::common::NoParameters &graph_parameters)
       :
       artis::fddevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      _beep("beep", parameters), _crc("crc", parameters), _mxr("mxr", parameters) {
+      _beep("beep", parameters), _crc("crc", parameters), _mxr("mxr", parameters)
+  {
     add_child(M_BEEP, &_beep);
     add_child(M_CRC, &_crc);
     add_child(M_MXR, &_mxr);

+ 54 - 27
src/tests/fddevs/models.hpp

@@ -36,16 +36,20 @@ namespace artis {
 namespace tests {
 namespace fddevs {
 
-enum CRC_state_values {
+enum CRC_state_values
+{
   I0 = 0, I1, G, GR, WW, W, DW
 };
 
-class CRC : public artis::fddevs::Dynamics<common::DoubleTime, CRC, CRC_state_values> {
+class CRC : public artis::fddevs::Dynamics<common::DoubleTime, CRC, CRC_state_values>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN_P
   };
-  enum outputs {
+  enum outputs
+  {
     OUT_G, OUT_W
   };
 
@@ -53,7 +57,8 @@ public:
       const artis::fddevs::Context<common::DoubleTime, CRC, artis::common::NoParameters> &context)
       :
       artis::fddevs::Dynamics<common::DoubleTime, CRC, CRC_state_values>(name,
-                                                                         context) {
+                                                                         context)
+  {
     input_ports({{IN_P, "p"}});
     output_ports({{OUT_G, "g"},
                   {OUT_W, "w"}});
@@ -63,7 +68,8 @@ public:
 
   ~CRC() override = default;
 
-  void delta_tau(typename common::DoubleTime::type /* t */) override {
+  void delta_tau(typename common::DoubleTime::type /* t */) override
+  {
     switch (state()) {
     case I0: {
       state(I1);
@@ -99,7 +105,8 @@ public:
   void
   delta_x(typename common::DoubleTime::type /* t */,
           typename common::DoubleTime::type /* e */,
-          const common::Bag<common::DoubleTime> &bag) override {
+          const common::Bag<common::DoubleTime> &bag) override
+  {
     assert(bag.size() == 1);
 
     if (bag.at(0).on_port(IN_P) and state() == G) {
@@ -108,7 +115,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(typename common::DoubleTime::type /* t */) const override {
+  lambda(typename common::DoubleTime::type /* t */) const override
+  {
     common::Bag<common::DoubleTime> msgs;
 
     switch (state()) {
@@ -142,12 +150,14 @@ public:
   }
 
   bool rho(typename common::DoubleTime::type /* time */,
-           const common::Bag<common::DoubleTime> &bag) const override {
+           const common::Bag<common::DoubleTime> &bag) const override
+  {
     return state() == G and bag.at(0).on_port(IN_P);
   }
 
   typename common::DoubleTime::type
-  tau(typename common::DoubleTime::type /* t */) const override {
+  tau(typename common::DoubleTime::type /* t */) const override
+  {
     switch (state()) {
     case I0:return 0;
     case I1:return 0;
@@ -161,13 +171,16 @@ public:
   }
 };
 
-enum MXR_state_values {
+enum MXR_state_values
+{
   A00 = 0, A01, A10, A11, R11
 };
 
-class MXR : public artis::fddevs::Dynamics<common::DoubleTime, MXR, MXR_state_values> {
+class MXR : public artis::fddevs::Dynamics<common::DoubleTime, MXR, MXR_state_values>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN_A, IN_B
   };
 
@@ -175,7 +188,8 @@ public:
       const artis::fddevs::Context<common::DoubleTime, MXR, artis::common::NoParameters> &context)
       :
       artis::fddevs::Dynamics<common::DoubleTime, MXR, MXR_state_values>(name,
-                                                                         context) {
+                                                                         context)
+  {
     input_ports({{IN_A, "a"},
                  {IN_B, "b"}});
     initial_state(A00);
@@ -183,7 +197,8 @@ public:
 
   ~MXR() override = default;
 
-  void delta_tau(typename common::DoubleTime::type /* t */) override {
+  void delta_tau(typename common::DoubleTime::type /* t */) override
+  {
     if (state() == A11) {
       state(R11);
     }
@@ -192,7 +207,8 @@ public:
   void
   delta_x(typename common::DoubleTime::type /* t */,
           typename common::DoubleTime::type /* e */,
-          const common::Bag<common::DoubleTime> &bag) override {
+          const common::Bag<common::DoubleTime> &bag) override
+  {
     std::for_each(bag.begin(), bag.end(),
                   [this](const artis::common::ExternalEvent<common::DoubleTime> &e) {
                     int data;
@@ -259,19 +275,22 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(typename common::DoubleTime::type /* t */) const override {
+  lambda(typename common::DoubleTime::type /* t */) const override
+  {
     common::Bag<common::DoubleTime> msgs;
 
     return msgs;
   }
 
   bool rho(typename common::DoubleTime::type /* time */,
-           const common::Bag<common::DoubleTime> & /* bag */) const override {
+           const common::Bag<common::DoubleTime> & /* bag */) const override
+  {
     return false;
   }
 
   typename common::DoubleTime::type
-  tau(typename common::DoubleTime::type /* t */) const override {
+  tau(typename common::DoubleTime::type /* t */) const override
+  {
     if (state() == A11) {
       return 0.01;
     } else {
@@ -280,14 +299,17 @@ public:
   }
 };
 
-enum Beep_state_values {
+enum Beep_state_values
+{
   INIT = 0, SEND
 };
 
 class Beep
-    : public artis::fddevs::Dynamics<common::DoubleTime, Beep, Beep_state_values> {
+    : public artis::fddevs::Dynamics<common::DoubleTime, Beep, Beep_state_values>
+{
 public:
-  enum outputs {
+  enum outputs
+  {
     OUT_P
   };
 
@@ -295,7 +317,8 @@ public:
        const artis::fddevs::Context<common::DoubleTime, Beep, artis::common::NoParameters> &context)
       :
       artis::fddevs::Dynamics<common::DoubleTime, Beep, Beep_state_values>(name,
-                                                                           context) {
+                                                                           context)
+  {
     output_ports({{OUT_P, "p"}});
 
     initial_state(INIT);
@@ -303,14 +326,16 @@ public:
 
   ~Beep() override = default;
 
-  void delta_tau(typename common::DoubleTime::type /* t */) override {
+  void delta_tau(typename common::DoubleTime::type /* t */) override
+  {
     if (state() == INIT) {
       state(SEND);
     }
   }
 
   common::Bag<common::DoubleTime>
-  lambda(typename common::DoubleTime::type /* t */) const override {
+  lambda(typename common::DoubleTime::type /* t */) const override
+  {
     common::Bag<common::DoubleTime> msgs;
 
     switch (state()) {
@@ -324,12 +349,14 @@ public:
   }
 
   bool rho(typename common::DoubleTime::type /* time */,
-           const common::Bag<common::DoubleTime> & /* bag */) const override {
+           const common::Bag<common::DoubleTime> & /* bag */) const override
+  {
     return false;
   }
 
   typename common::DoubleTime::type
-  tau(typename common::DoubleTime::type /* t */) const override {
+  tau(typename common::DoubleTime::type /* t */) const override
+  {
     switch (state()) {
     case INIT:return 27;
     case SEND:return common::DoubleTime::infinity;

+ 2 - 1
src/tests/fddevs/tests.cpp

@@ -36,7 +36,8 @@
 using namespace artis::tests::fddevs;
 using namespace artis::common;
 
-TEST_CASE("fddevs/cross road system", "run") {
+TEST_CASE("fddevs/cross road system", "run")
+{
   context::Context<DoubleTime> context(0, 70);
   RootCoordinator<
       DoubleTime, artis::fddevs::Coordinator<

+ 50 - 25
src/tests/mixed/graph_manager.hpp

@@ -42,12 +42,15 @@ namespace artis {
 namespace tests {
 namespace mixed {
 
-class S1GraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class S1GraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -57,7 +60,8 @@ public:
       :
       pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       a("a1", parameters),
-      b("b1", parameters) {
+      b("b1", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -75,12 +79,15 @@ private:
 };
 
 class S2GraphManager :
-    public dtss::GraphManager<common::DoubleTime, artis::dtss::Parameters<common::DoubleTime>> {
+    public dtss::GraphManager<common::DoubleTime, artis::dtss::Parameters<common::DoubleTime>>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum inputs {
+  enum inputs
+  {
     IN
   };
 
@@ -90,7 +97,8 @@ public:
       :
       dtss::GraphManager<common::DoubleTime, artis::dtss::Parameters<common::DoubleTime>>(
           coordinator, parameters, graph_parameters),
-      a("a2", parameters), b("b2", parameters) {
+      a("a2", parameters), b("b2", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -107,9 +115,11 @@ private:
   dtss::Simulator<common::DoubleTime, B2, artis::dtss::Parameters<common::DoubleTime>> b;
 };
 
-class RootGraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class RootGraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneS1, OneS2
   };
 
@@ -119,7 +129,8 @@ public:
       :
       pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       S1("S1", artis::common::NoParameters(), artis::common::NoParameters()),
-      S2("S2", {2}, artis::common::NoParameters()) {
+      S2("S2", {2}, artis::common::NoParameters())
+  {
     add_child(OneS1, &S1);
     add_child(OneS2, &S2);
 
@@ -138,13 +149,15 @@ private:
 };
 
 template<int size>
-class LinearGraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class LinearGraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
   LinearGraphManager(common::Coordinator<common::DoubleTime> *coordinator,
                      const artis::common::NoParameters &parameters,
                      const artis::common::NoParameters &graph_parameters)
       :
-      pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters) {
+      pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters)
+  {
     for (unsigned int i = 1; i <= size; ++i) {
       std::ostringstream ss;
 
@@ -161,7 +174,8 @@ public:
     }
   }
 
-  ~LinearGraphManager() override {
+  ~LinearGraphManager() override
+  {
     for (unsigned int i = 0; i < size; ++i) {
       delete _models[i];
     }
@@ -171,12 +185,15 @@ private:
   std::vector<pdevs::Simulator<common::DoubleTime, Beep, artis::common::NoParameters> *> _models;
 };
 
-class Linear2GraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class Linear2GraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -184,7 +201,8 @@ public:
                       const artis::common::NoParameters &parameters,
                       const artis::common::NoParameters &graph_parameters)
       :
-      pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters) {
+      pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters)
+  {
     for (unsigned int i = 1; i <= 100; ++i) {
       std::ostringstream ss;
 
@@ -207,7 +225,8 @@ public:
     out({_models[99], Beep::OUT}) >> out({coordinator, OUT});
   }
 
-  ~Linear2GraphManager() override {
+  ~Linear2GraphManager() override
+  {
     for (unsigned int i = 0; i < 100; ++i) {
       delete _models[i];
     }
@@ -217,9 +236,11 @@ private:
   std::vector<pdevs::Simulator<common::DoubleTime, Beep, artis::common::NoParameters> *> _models;
 };
 
-class Root2GraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class Root2GraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneS1, OneS2
   };
 
@@ -230,7 +251,8 @@ public:
       :
       pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       S1("S1", artis::common::NoParameters(), artis::common::NoParameters()),
-      S2("S2", artis::common::NoParameters(), artis::common::NoParameters()) {
+      S2("S2", artis::common::NoParameters(), artis::common::NoParameters())
+  {
     add_child(OneS1, &S1);
     add_child(OneS2, &S2);
 
@@ -244,9 +266,11 @@ private:
   artis::pdevs::Coordinator<common::DoubleTime, Linear2GraphManager> S2;
 };
 
-class Root3GraphManager : public pdevs::GraphManager<common::DoubleTime> {
+class Root3GraphManager : public pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneS1, OneS2
   };
 
@@ -257,7 +281,8 @@ public:
       :
       pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       S1("S1", artis::common::NoParameters(), artis::common::NoParameters()),
-      S2("S2", artis::common::NoParameters(), artis::common::NoParameters()) {
+      S2("S2", artis::common::NoParameters(), artis::common::NoParameters())
+  {
     add_child(OneS1, &S1);
     add_child(OneS2, &S2);
 

+ 94 - 47
src/tests/mixed/models.hpp

@@ -40,26 +40,31 @@ namespace tests {
 namespace mixed {
 
 class A1 :
-    public artis::pdevs::Dynamics<common::DoubleTime, A1> {
+    public artis::pdevs::Dynamics<common::DoubleTime, A1>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
   A1(const std::string &name,
      const artis::pdevs::Context<common::DoubleTime, A1, artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, A1>(name, context), _value(0) {
+      artis::pdevs::Dynamics<common::DoubleTime, A1>(name, context), _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~A1() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -82,7 +87,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type & /* e */,
-       const common::Bag<common::DoubleTime> &bag) override {
+       const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -104,7 +110,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type & /* e */,
-             const common::Bag<common::DoubleTime> &bag) override {
+             const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -122,7 +129,8 @@ public:
 #endif
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -140,7 +148,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type &t) const override {
+  ta(const typename common::DoubleTime::type &t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif
@@ -161,7 +170,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -185,7 +195,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     INIT, WAIT, SEND
   };
 
@@ -194,26 +205,31 @@ private:
 };
 
 class B1 :
-    public artis::pdevs::Dynamics<common::DoubleTime, B1> {
+    public artis::pdevs::Dynamics<common::DoubleTime, B1>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
   B1(const std::string &name,
      const artis::pdevs::Context<common::DoubleTime, B1, artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, B1>(name, context) {
+      artis::pdevs::Dynamics<common::DoubleTime, B1>(name, context)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~B1() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -236,7 +252,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type &e,
-       const common::Bag<common::DoubleTime> &bag) override {
+       const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifdef WITH_TRACE
     common::Trace<common::DoubleTime>::trace()
@@ -258,7 +275,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type &e,
-             const common::Bag<common::DoubleTime> &bag) override {
+             const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -280,7 +298,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -300,7 +319,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type &t) const override {
+  ta(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -323,7 +343,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -346,7 +367,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     INIT, WAIT, SEND
   };
 
@@ -357,12 +379,15 @@ private:
 class A2
     : public artis::dtss::Dynamics<artis::common::DoubleTime,
                                    A2,
-                                   artis::dtss::Parameters<common::DoubleTime>> {
+                                   artis::dtss::Parameters<common::DoubleTime>>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -375,7 +400,8 @@ public:
                             A2,
                             artis::dtss::Parameters<common::DoubleTime>>(
           name, context),
-      _value(0) {
+      _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
@@ -383,7 +409,8 @@ public:
   ~A2() override = default;
 
   void transition(const common::Bag<common::DoubleTime> &x,
-                  const typename common::DoubleTime::type &t) override {
+                  const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)x;
@@ -402,7 +429,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -419,7 +447,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -448,12 +477,15 @@ private:
 class B2
     : public artis::dtss::Dynamics<artis::common::DoubleTime,
                                    B2,
-                                   artis::dtss::Parameters<common::DoubleTime>> {
+                                   artis::dtss::Parameters<common::DoubleTime>>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -466,7 +498,8 @@ public:
                             B2,
                             artis::dtss::Parameters<common::DoubleTime>>(
           name, context),
-      _value(0) {
+      _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
@@ -474,7 +507,8 @@ public:
   ~B2() override = default;
 
   void transition(const common::Bag<common::DoubleTime> &x,
-                  const typename common::DoubleTime::type &t) override {
+                  const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)x;
@@ -493,7 +527,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -512,7 +547,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -539,26 +575,31 @@ private:
 };
 
 class Beep :
-    public artis::pdevs::Dynamics<common::DoubleTime, Beep> {
+    public artis::pdevs::Dynamics<common::DoubleTime, Beep>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
   Beep(const std::string &name,
        const artis::pdevs::Context<common::DoubleTime, Beep, artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, Beep>(name, context), _value(0) {
+      artis::pdevs::Dynamics<common::DoubleTime, Beep>(name, context), _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~Beep() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -581,7 +622,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type & /* e */,
-       const common::Bag<common::DoubleTime> &bag) override {
+       const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -603,7 +645,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type & /* e */,
-             const common::Bag<common::DoubleTime> &bag) override {
+             const common::Bag<common::DoubleTime> &bag) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -622,7 +665,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -641,7 +685,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type &t) const override {
+  ta(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -664,7 +709,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -687,7 +733,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     INIT, WAIT, SEND
   };
 

+ 2 - 1
src/tests/mixed/tests.cpp

@@ -36,7 +36,8 @@
 using namespace artis::tests::mixed;
 using namespace artis::common;
 
-TEST_CASE("mixed/hierachical", "run") {
+TEST_CASE("mixed/hierachical", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 100);
   artis::common::RootCoordinator<
       DoubleTime,

+ 76 - 38
src/tests/mpi/graph_manager.hpp

@@ -47,12 +47,15 @@ namespace artis {
 namespace tests {
 namespace mpi {
 
-class S1GraphManager : public artis::pdevs::mpi::GraphManager<common::DoubleTime> {
+class S1GraphManager : public artis::pdevs::mpi::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -63,7 +66,8 @@ public:
       artis::pdevs::mpi::GraphManager<common::DoubleTime>(coordinator,
                                                           parameters,
                                                           graph_parameters),
-      a("a1", parameters), b("b1", parameters) {
+      a("a1", parameters), b("b1", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -81,15 +85,19 @@ private:
 };
 
 class S2GraphManager :
-    public artis::pdevs::mpi::GraphManager<common::DoubleTime> {
+    public artis::pdevs::mpi::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -100,7 +108,8 @@ public:
       artis::pdevs::mpi::GraphManager<common::DoubleTime>(coordinator,
                                                           parameters,
                                                           graph_parameters),
-      a("a2", parameters), b("b2", parameters) {
+      a("a2", parameters), b("b2", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -119,14 +128,16 @@ private:
   artis::pdevs::Simulator<common::DoubleTime, pdevs::B> b;
 };
 
-struct RootGraphManagerParameters {
+struct RootGraphManagerParameters
+{
   std::vector<int> ranks;
 };
 
 class RootGraphManager
     : public artis::pdevs::GraphManager<common::DoubleTime,
                                         artis::common::NoParameters,
-                                        RootGraphManagerParameters> {
+                                        RootGraphManagerParameters>
+{
 public:
   RootGraphManager(
       common::Coordinator<common::DoubleTime> *coordinator,
@@ -136,7 +147,8 @@ public:
       artis::pdevs::GraphManager<common::DoubleTime,
                                  artis::common::NoParameters,
                                  RootGraphManagerParameters>(
-          coordinator, parameters, graph_parameters) {
+          coordinator, parameters, graph_parameters)
+  {
     ModelProxy *previous = nullptr;
     unsigned int i = 0;
 
@@ -164,7 +176,8 @@ public:
     }
   }
 
-  ~RootGraphManager() override {
+  ~RootGraphManager() override
+  {
     std::for_each(models.begin(), models.end(), std::default_delete<ModelProxy>());
   }
 
@@ -177,12 +190,15 @@ private:
 
 /******************************************************************************/
 
-class S1LocalGraphManager : public artis::pdevs::GraphManager<common::DoubleTime> {
+class S1LocalGraphManager : public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -191,7 +207,8 @@ public:
                       const artis::common::NoParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      a("a1", parameters), b("b1", parameters) {
+      a("a1", parameters), b("b1", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -203,12 +220,15 @@ public:
 
   ~S1LocalGraphManager() override = default;
 
-  void init() {}
+  void init()
+  {}
 
-  void start(common::DoubleTime::type /* t */) {}
+  void start(common::DoubleTime::type /* t */)
+  {}
 
   void transition(const common::Models<common::DoubleTime> & /* receivers */,
-                  common::DoubleTime::type /* t */) {}
+                  common::DoubleTime::type /* t */)
+  {}
 
 private:
   artis::pdevs::Simulator<common::DoubleTime, pdevs::A> a;
@@ -216,15 +236,19 @@ private:
 };
 
 class S2LocalGraphManager :
-    public artis::pdevs::GraphManager<common::DoubleTime> {
+    public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -233,7 +257,8 @@ public:
                       const artis::common::NoParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      a("a2", parameters), b("b2", parameters) {
+      a("a2", parameters), b("b2", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -247,12 +272,15 @@ public:
 
   ~S2LocalGraphManager() override = default;
 
-  void init() {}
+  void init()
+  {}
 
-  void start(common::DoubleTime::type /* t */) {}
+  void start(common::DoubleTime::type /* t */)
+  {}
 
   void transition(const common::Models<common::DoubleTime> & /* receivers */,
-                  common::DoubleTime::type /* t */) {}
+                  common::DoubleTime::type /* t */)
+  {}
 
 private:
   artis::pdevs::Simulator<common::DoubleTime, pdevs::A> a;
@@ -262,7 +290,8 @@ private:
 class RootLocalGraphManager :
     public artis::pdevs::GraphManager<common::DoubleTime,
                                       artis::common::NoParameters,
-                                      RootGraphManagerParameters> {
+                                      RootGraphManagerParameters>
+{
 public:
   RootLocalGraphManager(
       common::Coordinator<common::DoubleTime> *coordinator,
@@ -273,7 +302,8 @@ public:
                                  artis::common::NoParameters,
                                  RootGraphManagerParameters>(
           coordinator, parameters, graph_parameters),
-      first("S0", artis::common::NoParameters(), artis::common::NoParameters()) {
+      first("S0", artis::common::NoParameters(), artis::common::NoParameters())
+  {
     Next *previous = nullptr;
     unsigned int i = 1;
 
@@ -295,7 +325,8 @@ public:
     out({&first, S1GraphManager::OUT}) >> in({nexts[0], S2GraphManager::IN});
   }
 
-  ~RootLocalGraphManager() override {
+  ~RootLocalGraphManager() override
+  {
     std::for_each(nexts.begin(), nexts.end(),
                   std::default_delete<Next>());
   }
@@ -314,7 +345,8 @@ private:
 class RootMultithreadingGraphManager :
     public artis::pdevs::GraphManager<common::DoubleTime,
                                       artis::common::NoParameters,
-                                      RootGraphManagerParameters> {
+                                      RootGraphManagerParameters>
+{
   typedef artis::pdevs::multithreading::Coordinator<
       common::DoubleTime,
       RootMultithreadingGraphManager,
@@ -331,7 +363,8 @@ public:
                                  artis::common::NoParameters,
                                  RootGraphManagerParameters>(
           coordinator, parameters, graph_parameters),
-      first("S0", artis::common::NoParameters(), artis::common::NoParameters()) {
+      first("S0", artis::common::NoParameters(), artis::common::NoParameters())
+  {
     Next *previous = nullptr;
     unsigned int i = 1;
 
@@ -353,18 +386,21 @@ public:
     out({&first, S1GraphManager::OUT}) >> in({nexts[0], S2GraphManager::IN});
   }
 
-  ~RootMultithreadingGraphManager() override {
+  ~RootMultithreadingGraphManager() override
+  {
     std::for_each(nexts.begin(), nexts.end(), std::default_delete<Next>());
   }
 
-  void init() {
+  void init()
+  {
     first.set_sender(dynamic_cast < ParentCoordinator * >(coordinator())->get_sender());
     for (Nexts::const_iterator it = nexts.begin(); it != nexts.end(); ++it) {
       (*it)->set_sender(dynamic_cast < ParentCoordinator *  >(coordinator())->get_sender());
     }
   }
 
-  void start(common::DoubleTime::type t) {
+  void start(common::DoubleTime::type t)
+  {
     first.get_sender().send(
         artis::pdevs::multithreading::start_message<
             artis::common::DoubleTime>(t));
@@ -375,7 +411,8 @@ public:
   }
 
   void transition(const common::Models<common::DoubleTime> &receivers,
-                  artis::common::DoubleTime::type t) {
+                  artis::common::DoubleTime::type t)
+  {
     auto it = receivers.begin();
 
     while (it != receivers.end()) {
@@ -407,7 +444,8 @@ private:
 
 /******************************************************************************/
 
-struct GridGraphManagerParameters {
+struct GridGraphManagerParameters
+{
   unsigned int global_size;
   unsigned int sub_grid_size;
 };

+ 8 - 4
src/tests/mpi/main.cpp

@@ -41,7 +41,8 @@ using namespace artis::common;
 using namespace boost::mpi;
 using namespace std::chrono;
 
-void example_simple(int argc, char *argv[]) {
+void example_simple(int argc, char *argv[])
+{
   environment env(argc, argv);
   communicator world;
 
@@ -105,7 +106,8 @@ void example_simple(int argc, char *argv[]) {
   }
 }
 
-void example_simple_local() {
+void example_simple_local()
+{
   artis::tests::mpi::RootGraphManagerParameters parameters;
 
   parameters.ranks.push_back(1);
@@ -138,7 +140,8 @@ void example_simple_local() {
   std::cout << "CHAIN = " << time_span.count() << std::endl;
 }
 
-void example_simple_multithreading() {
+void example_simple_multithreading()
+{
   artis::tests::mpi::RootGraphManagerParameters parameters;
 
   parameters.ranks.push_back(1);
@@ -273,7 +276,8 @@ void example_simple_multithreading() {
 // in output directory:
 //  $ mpirun -np 4 -hostfile host_file ../cmake-build-debug/src/tests/mpi/pdevs-mpi-main
 
-int main(int argc, char *argv[]) {
+int main(int argc, char *argv[])
+{
   std::cout << "== MPI ==" << std::endl;
   example_simple(argc, argv);
   std::cout << "== Multithreading ==" << std::endl;

+ 34 - 17
src/tests/multithreading/lifegame/graph_manager.hpp

@@ -38,7 +38,8 @@ namespace tests {
 namespace multithreading {
 namespace lifegame {
 
-struct GridGraphManagerParameters {
+struct GridGraphManagerParameters
+{
   unsigned int begin_column;
   unsigned int end_column;
   unsigned int begin_line;
@@ -52,9 +53,11 @@ struct GridGraphManagerParameters {
 class FlatGraphManager
     : public artis::pdevs::GraphManager<common::DoubleTime,
                                         CellParameters,
-                                        GridGraphManagerParameters> {
+                                        GridGraphManagerParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     CELL
   };
 
@@ -63,7 +66,8 @@ public:
                    const GridGraphManagerParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime, CellParameters, GridGraphManagerParameters>(
-          coordinator, parameters, graph_parameters) {
+          coordinator, parameters, graph_parameters)
+  {
     unsigned int column_number =
         graph_parameters.end_column - graph_parameters.begin_column + 1;
     unsigned int line_number =
@@ -139,7 +143,8 @@ public:
     }
   }
 
-  ~FlatGraphManager() override {
+  ~FlatGraphManager() override
+  {
     std::for_each(_cells.begin(), _cells.end(),
                   std::default_delete<Simulator>());
   }
@@ -151,14 +156,16 @@ private:
   Simulators _cells;
 };
 
-class ParallelBuiltFlatGraphManager : public FlatGraphManager {
+class ParallelBuiltFlatGraphManager : public FlatGraphManager
+{
 public:
   ParallelBuiltFlatGraphManager(
       common::Coordinator<common::DoubleTime> *coordinator,
       const CellParameters &parameters,
       const GridGraphManagerParameters &graph_parameters)
       :
-      FlatGraphManager(coordinator, parameters, graph_parameters) {
+      FlatGraphManager(coordinator, parameters, graph_parameters)
+  {
     // inputs
     unsigned int k = 0;
 
@@ -270,13 +277,16 @@ public:
 //                        }
   }
 
-  void init() {}
+  void init()
+  {}
 
-  void start(common::DoubleTime::type /* t */) {}
+  void start(common::DoubleTime::type /* t */)
+  {}
 
   void transition(
       const common::Models<common::DoubleTime> & /* receivers */,
-      common::DoubleTime::type /* t */) {}
+      common::DoubleTime::type /* t */)
+  {}
 
   ~ParallelBuiltFlatGraphManager() override = default;
 };
@@ -284,9 +294,11 @@ public:
 class ParallelHierarchicalGraphManager :
     public artis::pdevs::GraphManager<common::DoubleTime,
                                       CellParameters,
-                                      GridGraphManagerParameters> {
+                                      GridGraphManagerParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     S1_1 = 0, S1_2, S2_1, S2_2
   };
 
@@ -297,7 +309,8 @@ public:
       :
       artis::pdevs::GraphManager<common::DoubleTime, CellParameters,
                                  GridGraphManagerParameters>(
-          coordinator, parameters, graph_parameters) {
+          coordinator, parameters, graph_parameters)
+  {
     // build coordinators (graphs)
     for (unsigned int i = 0; i < 2; ++i) {
       for (unsigned int j = 0; j < 2; ++j) {
@@ -339,14 +352,16 @@ public:
 
   }
 
-  ~ParallelHierarchicalGraphManager() override {
+  ~ParallelHierarchicalGraphManager() override
+  {
     for (typename Coordinators::const_iterator it = _coordinators.begin();
          it != _coordinators.end(); ++it) {
       delete *it;
     }
   }
 
-  void init() {
+  void init()
+  {
     std::for_each(_coordinators.begin(), _coordinators.end(),
                   [this](ParallelCoordinator *coordinator) {
                     coordinator->set_sender(
@@ -358,7 +373,8 @@ public:
                   });
   }
 
-  void start(common::DoubleTime::type t) {
+  void start(common::DoubleTime::type t)
+  {
     std::for_each(_coordinators.begin(), _coordinators.end(),
                   [t](ParallelCoordinator *coordinator) {
                     coordinator->get_sender().send(
@@ -368,7 +384,8 @@ public:
   }
 
   void transition(const common::Models<common::DoubleTime> &receivers,
-                  artis::common::DoubleTime::type t) {
+                  artis::common::DoubleTime::type t)
+  {
     std::for_each(receivers.begin(), receivers.end(),
                   [this, t](const common::Model<common::DoubleTime> *model) {
                     if (not model->is_atomic()) {

+ 12 - 6
src/tests/multithreading/lifegame/main.cpp

@@ -244,14 +244,17 @@ CellParameters parameters({
                           });
 GridGraphManagerParameters graph_parameters({1, 10, 1, 10, 1, 10, 1, 10});
 
-class View : public artis::observer::View<artis::common::DoubleTime> {
+class View : public artis::observer::View<artis::common::DoubleTime>
+{
 public:
-  View() {
+  View()
+  {
     selector("Cell:state", {FlatGraphManager::CELL, ALL, Cell::STATE});
   }
 };
 
-void show_state(const artis::observer::View<artis::common::DoubleTime> &view) {
+void show_state(const artis::observer::View<artis::common::DoubleTime> &view)
+{
   std::vector<std::vector<std::vector<bool> > > states;
 
   for (unsigned int t = 0; t <= 11; ++t) {
@@ -292,7 +295,8 @@ void show_state(const artis::observer::View<artis::common::DoubleTime> &view) {
   }
 }
 
-double lifegame_monothreading() {
+double lifegame_monothreading()
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::Coordinator<
@@ -317,7 +321,8 @@ double lifegame_monothreading() {
   return time_span.count();
 }
 
-double lifegame_multithreading() {
+double lifegame_multithreading()
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::multithreading::Coordinator<
@@ -338,7 +343,8 @@ double lifegame_multithreading() {
   return time_span.count();
 }
 
-int main() {
+int main()
+{
 //    std::cout << lifegame_monothreading() << std::endl;
   std::cout << lifegame_multithreading() << std::endl;
   return 0;

+ 28 - 14
src/tests/multithreading/lifegame/models.hpp

@@ -36,21 +36,26 @@ namespace tests {
 namespace multithreading {
 namespace lifegame {
 
-struct CellParameters {
+struct CellParameters
+{
   std::map<std::string, int> neighbour_numbers;
   std::map<std::string, bool> initial_states;
 };
 
 class Cell
-    : public artis::pdevs::Dynamics<common::DoubleTime, Cell, CellParameters> {
+    : public artis::pdevs::Dynamics<common::DoubleTime, Cell, CellParameters>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
-  enum states {
+  enum states
+  {
     STATE
   };
 
@@ -61,7 +66,8 @@ public:
                                                                        context),
       _neighbour_number(
           context.parameters().neighbour_numbers.find(name)->second),
-      _initial_state(context.parameters().initial_states.find(name)->second) {
+      _initial_state(context.parameters().initial_states.find(name)->second)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
     observables({{STATE, "state"}});
@@ -69,7 +75,8 @@ public:
 
   ~Cell() override = default;
 
-  void dint(const typename common::DoubleTime::type & /* t */) override {
+  void dint(const typename common::DoubleTime::type & /* t */) override
+  {
     if (_phase == SEND) {
       _phase = WAIT;
       _sigma = common::DoubleTime::infinity;
@@ -89,7 +96,8 @@ public:
 
   void dext(const typename common::DoubleTime::type & /* t */,
             const typename common::DoubleTime::type & /* e */,
-            const common::Bag<common::DoubleTime> &bag) override {
+            const common::Bag<common::DoubleTime> &bag) override
+  {
     std::for_each(bag.begin(), bag.end(),
                   [this](const common::ExternalEvent<common::DoubleTime> &e) {
                     if (e.on_port(IN)) {
@@ -114,11 +122,13 @@ public:
   void
   dconf(const typename common::DoubleTime::type &t,
         const typename common::DoubleTime::type &e,
-        const common::Bag<common::DoubleTime> &bag) override {
+        const common::Bag<common::DoubleTime> &bag) override
+  {
     dext(t, e, bag);
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
     (void) t;
 
     _phase = SEND;
@@ -129,12 +139,14 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type & /* t */) const override {
+  ta(const typename common::DoubleTime::type & /* t */) const override
+  {
     return _sigma;
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type & /* t */) const override {
+  lambda(const typename common::DoubleTime::type & /* t */) const override
+  {
     common::Bag<common::DoubleTime> bag;
 
     if (_phase == SEND) {
@@ -145,7 +157,8 @@ public:
   }
 
   common::Value observe(const common::DoubleTime::type & /* t */,
-                        unsigned int index) const override {
+                        unsigned int index) const override
+  {
     if (index == STATE) {
       return _state;
     }
@@ -153,7 +166,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     SEND, WAIT, NEW_STATE
   };
 

+ 36 - 18
src/tests/multithreading/simple/graph_manager.hpp

@@ -39,20 +39,26 @@ namespace multithreading {
 namespace simple {
 
 class LinksGraphManager :
-    public artis::pdevs::GraphManager<artis::common::DoubleTime, GeneratorParameters> {
+    public artis::pdevs::GraphManager<artis::common::DoubleTime, GeneratorParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     LINK_1, LINK_2
   };
 
-  struct inputs {
-    enum values {
+  struct inputs
+  {
+    enum values
+    {
       IN_1, IN_2
     };
   };
 
-  struct outputs {
-    enum values {
+  struct outputs
+  {
+    enum values
+    {
       OUT_1, OUT_2
     };
   };
@@ -65,7 +71,8 @@ public:
       artis::pdevs::GraphManager<artis::common::DoubleTime, GeneratorParameters>(
           coordinator, parameters, graph_parameters),
       _link_1("link_1", artis::common::NoParameters()),
-      _link_2("link_2", artis::common::NoParameters()) {
+      _link_2("link_2", artis::common::NoParameters())
+  {
     add_child(LINK_1, &_link_1);
     add_child(LINK_2, &_link_2);
 
@@ -88,18 +95,22 @@ public:
   ~LinksGraphManager() override = default;
 
   common::DoubleTime::type
-  lookahead(const common::DoubleTime::type &t) const override {
+  lookahead(const common::DoubleTime::type &t) const override
+  {
     std::vector<double> lookaheads = {_link_1.lookahead(t),
                                       _link_2.lookahead(t)};
     return *std::min(lookaheads.begin(), lookaheads.end());
   }
 
-  void init() {}
+  void init()
+  {}
 
-  void start(common::DoubleTime::type /* t */) {}
+  void start(common::DoubleTime::type /* t */)
+  {}
 
   void transition(const common::Models<common::DoubleTime> & /* receivers */,
-                  artis::common::DoubleTime::type /* t */) {}
+                  artis::common::DoubleTime::type /* t */)
+  {}
 
 private:
   artis::pdevs::Simulator<artis::common::DoubleTime, Link> _link_1;
@@ -107,9 +118,11 @@ private:
 };
 
 class SimpleGraphManager :
-    public artis::pdevs::GraphManager<artis::common::DoubleTime, GeneratorParameters> {
+    public artis::pdevs::GraphManager<artis::common::DoubleTime, GeneratorParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     GENERATOR, LINK_1_2, LINK_3_4, LINK_5_6, LINK_7_8, COUNTER
   };
 
@@ -125,7 +138,8 @@ public:
       _link_3_4("link_3_4", parameters, artis::common::NoParameters()),
       _link_5_6("link_5_6", parameters, artis::common::NoParameters()),
       _link_7_8("link_7_8", parameters, artis::common::NoParameters()),
-      _counter("counter", artis::common::NoParameters()) {
+      _counter("counter", artis::common::NoParameters())
+  {
     add_child(GENERATOR, &_generator);
     add_child(LINK_1_2, &_link_1_2);
     add_child(LINK_3_4, &_link_3_4);
@@ -171,7 +185,8 @@ public:
   ~SimpleGraphManager() override = default;
 
   common::DoubleTime::type
-  lookahead(const common::DoubleTime::type &t) const override {
+  lookahead(const common::DoubleTime::type &t) const override
+  {
     std::vector<double> lookaheads = {_generator.lookahead(t),
                                       _link_1_2.lookahead(t),
                                       _link_3_4.lookahead(t),
@@ -181,7 +196,8 @@ public:
     return *std::min(lookaheads.begin(), lookaheads.end());
   }
 
-  void init() {
+  void init()
+  {
     _link_1_2.set_sender(
         (dynamic_cast< artis::pdevs::multithreading::Coordinator<
             artis::common::DoubleTime,
@@ -208,7 +224,8 @@ public:
             artis::common::NoParameters> *>(this->coordinator()))->get_sender());
   }
 
-  void start(common::DoubleTime::type t) {
+  void start(common::DoubleTime::type t)
+  {
     _link_1_2.get_sender().send(
         artis::pdevs::multithreading::start_message<
             artis::common::DoubleTime>(t));
@@ -224,7 +241,8 @@ public:
   }
 
   void transition(const common::Models<common::DoubleTime> &receivers,
-                  artis::common::DoubleTime::type t) {
+                  artis::common::DoubleTime::type t)
+  {
     std::for_each(receivers.begin(), receivers.end(),
                   [this, t](const common::Model<common::DoubleTime> *model) {
                     if (not model->is_atomic()) {

+ 6 - 3
src/tests/multithreading/simple/main.cpp

@@ -36,7 +36,8 @@ using namespace artis::common;
 using namespace std::chrono;
 using namespace artis::tests::multithreading::simple;
 
-void simple_monothreading() {
+void simple_monothreading()
+{
   GeneratorParameters parameters = {10, 2, 5, 763752};
   artis::common::context::Context<artis::common::DoubleTime> context(0, 1000);
   artis::common::RootCoordinator<
@@ -58,7 +59,8 @@ void simple_monothreading() {
   std::cout << "Time = " << time_span.count() << std::endl;
 }
 
-void simple_multithreading() {
+void simple_multithreading()
+{
   GeneratorParameters parameters = {10, 2, 5, 763752};
   artis::common::context::Context<artis::common::DoubleTime> context(0, 1000);
   artis::common::RootCoordinator<
@@ -80,7 +82,8 @@ void simple_multithreading() {
   std::cout << "Time = " << time_span.count() << std::endl;
 }
 
-int main() {
+int main()
+{
 //    simple_monothreading();
   simple_multithreading();
   return 0;

+ 76 - 38
src/tests/multithreading/simple/models.hpp

@@ -37,7 +37,8 @@ namespace tests {
 namespace multithreading {
 namespace simple {
 
-void delay() {
+void delay()
+{
   for (unsigned int i = 0; i < 1000; ++i) {
     std::vector<int> v;
 
@@ -48,13 +49,16 @@ void delay() {
   }
 }
 
-struct State {
-  enum values {
+struct State
+{
+  enum values
+  {
     STOP, UP, MAX, DOWN
   };
 };
 
-struct Vehicle {
+struct Vehicle
+{
   unsigned int index;
   double v_max;
   double acceleration;
@@ -62,7 +66,8 @@ struct Vehicle {
   artis::common::DoubleTime::type next_time;
 };
 
-struct GeneratorParameters {
+struct GeneratorParameters
+{
   double v_max;
   double mean;
   double stddev;
@@ -70,10 +75,13 @@ struct GeneratorParameters {
 };
 
 class Generator
-    : public artis::pdevs::Dynamics<artis::common::DoubleTime, Generator, GeneratorParameters> {
+    : public artis::pdevs::Dynamics<artis::common::DoubleTime, Generator, GeneratorParameters>
+{
 public:
-  struct outputs {
-    enum values {
+  struct outputs
+  {
+    enum values
+    {
       OUT
     };
   };
@@ -88,7 +96,8 @@ public:
       _v_max(context.parameters().v_max),
       _distribution(context.parameters().mean, context.parameters().stddev),
       _v_max_distribution(0.5, 1.),
-      _port_distribution(0, 7) {
+      _port_distribution(0, 7)
+  {
     _generator.seed(context.parameters().seed);
 
     output_ports({{outputs::OUT, "out_1"}});
@@ -103,7 +112,8 @@ public:
 
   ~Generator() override = default;
 
-  void dint(const artis::common::DoubleTime::type &t) override {
+  void dint(const artis::common::DoubleTime::type &t) override
+  {
     _last_time = t;
     _sigma = _distribution(_generator);
     _sigma = _sigma <= 0 ? 0.1 : _sigma;
@@ -113,7 +123,8 @@ public:
     ++_index;
   }
 
-  void start(const artis::common::DoubleTime::type &t) override {
+  void start(const artis::common::DoubleTime::type &t) override
+  {
     _last_time = t;
     _sigma = _distribution(_generator);
     _sigma = _sigma <= 0 ? 0.1 : _sigma;
@@ -123,10 +134,12 @@ public:
   }
 
   artis::common::DoubleTime::type
-  ta(const artis::common::DoubleTime::type & /* t */) const override { return _sigma; }
+  ta(const artis::common::DoubleTime::type & /* t */) const override
+  { return _sigma; }
 
   artis::common::Bag<artis::common::DoubleTime>
-  lambda(const artis::common::DoubleTime::type &t) const override {
+  lambda(const artis::common::DoubleTime::type &t) const override
+  {
     artis::common::Bag<artis::common::DoubleTime> bag;
 
     if (t > 0) {
@@ -140,7 +153,8 @@ public:
   }
 
   common::DoubleTime::type
-  lookahead(const common::DoubleTime::type & /* t */) const override {
+  lookahead(const common::DoubleTime::type & /* t */) const override
+  {
     return _last_time + _sigma;
   }
 
@@ -161,16 +175,21 @@ private:
 };
 
 class Counter
-    : public artis::pdevs::Dynamics<artis::common::DoubleTime, Counter> {
+    : public artis::pdevs::Dynamics<artis::common::DoubleTime, Counter>
+{
 public:
-  struct inputs {
-    enum values {
+  struct inputs
+  {
+    enum values
+    {
       IN
     };
   };
 
-  struct vars {
-    enum values {
+  struct vars
+  {
+    enum values
+    {
       COUNTER
     };
   };
@@ -179,7 +198,8 @@ public:
           const artis::pdevs::Context<artis::common::DoubleTime, Counter> &context)
       :
       artis::pdevs::Dynamics<artis::common::DoubleTime, Counter>(name,
-                                                                 context) {
+                                                                 context)
+  {
     input_port({inputs::IN, "in"});
     observable({vars::COUNTER, "counter"});
   }
@@ -189,25 +209,29 @@ public:
   void
   dext(const artis::common::DoubleTime::type & /* t */,
        const artis::common::DoubleTime::type & /* e */,
-       const artis::common::Bag<artis::common::DoubleTime> &bag) override {
+       const artis::common::Bag<artis::common::DoubleTime> &bag) override
+  {
 
 //                        std::cout << t << ": " << _counter << std::endl;
 
     _counter += bag.size();
   }
 
-  void start(const artis::common::DoubleTime::type & /* t */) override {
+  void start(const artis::common::DoubleTime::type & /* t */) override
+  {
     _counter = 0;
   }
 
   artis::common::DoubleTime::type
-  ta(const artis::common::DoubleTime::type & /* t */) const override {
+  ta(const artis::common::DoubleTime::type & /* t */) const override
+  {
     return artis::common::DoubleTime::infinity;
   }
 
   artis::common::Value
   observe(const artis::common::DoubleTime::type & /* t */,
-          unsigned int index) const override {
+          unsigned int index) const override
+  {
     if (index == vars::COUNTER) {
       return _counter;
     } else {
@@ -216,7 +240,8 @@ public:
   }
 
   common::DoubleTime::type
-  lookahead(const common::DoubleTime::type & /* t */) const override {
+  lookahead(const common::DoubleTime::type & /* t */) const override
+  {
     return common::DoubleTime::infinity;
   }
 
@@ -225,30 +250,37 @@ private:
 };
 
 class Link :
-    public artis::pdevs::Dynamics<common::DoubleTime, Link> {
+    public artis::pdevs::Dynamics<common::DoubleTime, Link>
+{
 public :
-  struct inputs {
-    enum values {
+  struct inputs
+  {
+    enum values
+    {
       IN
     };
   };
 
-  struct outputs {
-    enum values {
+  struct outputs
+  {
+    enum values
+    {
       OUT
     };
   };
 
   Link(const std::string &name,
        const artis::pdevs::Context<common::DoubleTime, Link> &context)
-      : artis::pdevs::Dynamics<common::DoubleTime, Link>(name, context) {
+      : artis::pdevs::Dynamics<common::DoubleTime, Link>(name, context)
+  {
     input_port({inputs::IN, "in"});
     output_port({outputs::OUT, "out"});
   }
 
   ~ Link() override = default;
 
-  void dint(const artis::common::DoubleTime::type &t) override {
+  void dint(const artis::common::DoubleTime::type &t) override
+  {
     delay();
 
     auto it = _vehicles.begin();
@@ -296,7 +328,8 @@ public :
 
   void dext(const artis::common::DoubleTime::type &t,
             const artis::common::DoubleTime::type & /* e */,
-            const artis::common::Bag<artis::common::DoubleTime> &bag) override {
+            const artis::common::Bag<artis::common::DoubleTime> &bag) override
+  {
     std::for_each(bag.begin(), bag.end(),
                   [this, t](const common::ExternalEvent<common::DoubleTime> &event) {
                     if (event.on_port(inputs::IN)) {
@@ -313,10 +346,12 @@ public :
   }
 
   artis::common::DoubleTime::type
-  ta(const artis::common::DoubleTime::type & /* t */) const override { return _sigma; }
+  ta(const artis::common::DoubleTime::type & /* t */) const override
+  { return _sigma; }
 
   artis::common::Bag<artis::common::DoubleTime>
-  lambda(const artis::common::DoubleTime::type &t) const override {
+  lambda(const artis::common::DoubleTime::type &t) const override
+  {
     artis::common::Bag<artis::common::DoubleTime> bag;
 
     for (auto vehicle: _vehicles) {
@@ -330,10 +365,12 @@ public :
   }
 
   void
-  start(const artis::common::DoubleTime::type & /* t */) override {}
+  start(const artis::common::DoubleTime::type & /* t */) override
+  {}
 
   common::DoubleTime::type
-  lookahead(const common::DoubleTime::type &t) const override {
+  lookahead(const common::DoubleTime::type &t) const override
+  {
     double eot = artis::common::DoubleTime::infinity;
 
     for (auto vehicle: _vehicles) {
@@ -362,7 +399,8 @@ public :
   }
 
 private:
-  void update_sigma(const artis::common::DoubleTime::type &t) {
+  void update_sigma(const artis::common::DoubleTime::type &t)
+  {
     if (_vehicles.empty()) {
       _sigma = artis::common::DoubleTime::infinity;
     } else {

+ 34 - 17
src/tests/pdevs/graph_manager.hpp

@@ -37,12 +37,15 @@ namespace artis {
 namespace tests {
 namespace pdevs {
 
-class S1GraphManager : public artis::pdevs::GraphManager<common::DoubleTime> {
+class S1GraphManager : public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -51,7 +54,8 @@ public:
                  const artis::common::NoParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      a("a1", parameters), b("b1", parameters) {
+      a("a1", parameters), b("b1", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -68,12 +72,15 @@ private:
   artis::pdevs::Simulator<common::DoubleTime, B> b;
 };
 
-class S2GraphManager : public artis::pdevs::GraphManager<common::DoubleTime> {
+class S2GraphManager : public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneA, OneB
   };
-  enum inputs {
+  enum inputs
+  {
     IN
   };
 
@@ -82,7 +89,8 @@ public:
                  const artis::common::NoParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      a("a2", parameters), b("b2", parameters) {
+      a("a2", parameters), b("b2", parameters)
+  {
     add_child(OneA, &a);
     add_child(OneB, &b);
 
@@ -100,9 +108,11 @@ private:
 };
 
 class RootGraphManager :
-    public artis::pdevs::GraphManager<common::DoubleTime> {
+    public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneS1, OneS2
   };
 
@@ -113,7 +123,8 @@ public:
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       S1("S1", parameters, graph_parameters),
-      S2("S2", parameters, graph_parameters) {
+      S2("S2", parameters, graph_parameters)
+  {
     add_child(OneS1, &S1);
     add_child(OneS2, &S2);
 
@@ -129,9 +140,11 @@ private:
 
 template<typename M>
 class OnlyOneGraphManager :
-    public artis::pdevs::GraphManager<common::DoubleTime> {
+    public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     OneM
   };
 
@@ -140,7 +153,8 @@ public:
                       const artis::common::NoParameters &graph_parameters)
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
-      model("a", parameters) {
+      model("a", parameters)
+  {
     add_child(OneM, &model);
   }
 
@@ -151,9 +165,11 @@ private:
 };
 
 class FlatGraphManager :
-    public artis::pdevs::GraphManager<common::DoubleTime> {
+    public artis::pdevs::GraphManager<common::DoubleTime>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     FirstA, SecondA,
     FirstB, SecondB
   };
@@ -164,7 +180,8 @@ public:
       :
       artis::pdevs::GraphManager<common::DoubleTime>(coordinator, parameters, graph_parameters),
       a1("a1", parameters), b1("b1", parameters),
-      a2("a2", parameters), b2("b2", parameters) {
+      a2("a2", parameters), b2("b2", parameters)
+  {
     add_child(FirstA, &a1);
     add_child(FirstB, &b1);
     add_child(SecondA, &a2);

+ 2 - 1
src/tests/pdevs/main.cpp

@@ -34,7 +34,8 @@
 
 using namespace artis::tests::pdevs;
 
-int main() {
+int main()
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10000);
   artis::common::RootCoordinator<
       artis::common::DoubleTime, artis::pdevs::Coordinator<

+ 102 - 51
src/tests/pdevs/models.hpp

@@ -41,47 +41,57 @@ namespace artis {
 namespace tests {
 namespace pdevs {
 
-struct data {
+struct data
+{
   double x;
   double y;
 
   data()
-      : x(0), y(0) {}
+      : x(0), y(0)
+  {}
 
   data(double _x, double _y)
-      : x(_x), y(_y) {}
+      : x(_x), y(_y)
+  {}
 };
 
-class Inactive : public artis::pdevs::Dynamics<common::DoubleTime, Inactive> {
+class Inactive : public artis::pdevs::Dynamics<common::DoubleTime, Inactive>
+{
 public:
   Inactive(const std::string &name,
            const artis::pdevs::Context<common::DoubleTime, Inactive> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, Inactive>(name, context) {}
+      artis::pdevs::Dynamics<common::DoubleTime, Inactive>(name, context)
+  {}
 
   ~Inactive() override = default;
 };
 
-class A : public artis::pdevs::Dynamics<common::DoubleTime, A> {
+class A : public artis::pdevs::Dynamics<common::DoubleTime, A>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
   A(const std::string &name,
     const artis::pdevs::Context<common::DoubleTime, A, artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, A>(name, context) {
+      artis::pdevs::Dynamics<common::DoubleTime, A>(name, context)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~A() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -108,7 +118,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type & /* e */,
-       const common::Bag <common::DoubleTime> &msgs) override {
+       const common::Bag <common::DoubleTime> &msgs) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -130,7 +141,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type & /* e */,
-             const common::Bag <common::DoubleTime> &msgs) override {
+             const common::Bag <common::DoubleTime> &msgs) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -149,7 +161,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -168,7 +181,8 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type &t) const override {
+  ta(const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -191,7 +205,8 @@ public:
   }
 
   common::Bag <common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif
@@ -216,7 +231,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     WAIT, SEND
   };
 
@@ -224,12 +240,15 @@ private:
   data _value;
 };
 
-class B : public artis::pdevs::Dynamics<common::DoubleTime, B> {
+class B : public artis::pdevs::Dynamics<common::DoubleTime, B>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -237,14 +256,16 @@ public:
     const artis::pdevs::Context<common::DoubleTime, B, artis::common::NoParameters> &context)
       :
       artis::pdevs::Dynamics<common::DoubleTime, B>(name, context),
-      _value(0) {
+      _value(0)
+  {
     input_ports({{IN, "in"}});
     output_ports({{OUT, "out"}});
   }
 
   ~B() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -267,7 +288,8 @@ public:
   void
   dext(const typename common::DoubleTime::type &t,
        const typename common::DoubleTime::type & /* e */,
-       const common::Bag <common::DoubleTime> &msgs) override {
+       const common::Bag <common::DoubleTime> &msgs) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -289,7 +311,8 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type &e,
-             const common::Bag <common::DoubleTime> &msgs) override {
+             const common::Bag <common::DoubleTime> &msgs) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -310,7 +333,8 @@ public:
 
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -329,7 +353,8 @@ public:
   }
 
   typename common::DoubleTime::type ta(
-      const typename common::DoubleTime::type &t) const override {
+      const typename common::DoubleTime::type &t) const override
+  {
 
 #ifndef WITH_TRACE
     (void)t;
@@ -352,7 +377,8 @@ public:
   }
 
   common::Bag <common::DoubleTime> lambda(
-      const typename common::DoubleTime::type &t) const override {
+      const typename common::DoubleTime::type &t) const override
+  {
 #ifndef WITH_TRACE
     (void)t;
 #endif
@@ -377,7 +403,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     WAIT, SEND
   };
 
@@ -385,18 +412,21 @@ private:
   double _value;
 };
 
-class TwoStateModel : public artis::pdevs::Dynamics<common::DoubleTime, TwoStateModel> {
+class TwoStateModel : public artis::pdevs::Dynamics<common::DoubleTime, TwoStateModel>
+{
 public:
   TwoStateModel(const std::string &name,
                 const artis::pdevs::Context<common::DoubleTime,
                                             TwoStateModel,
                                             artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, TwoStateModel>(name, context) {}
+      artis::pdevs::Dynamics<common::DoubleTime, TwoStateModel>(name, context)
+  {}
 
   ~TwoStateModel() override = default;
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
     if (_phase == S1) {
       _phase = S2;
     } else if (_phase == S2) {
@@ -405,13 +435,15 @@ public:
     _last_time = t;
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
     _phase = S1;
     _last_time = t;
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type & /* t */) const override {
+  ta(const typename common::DoubleTime::type & /* t */) const override
+  {
     if (_phase == S1) {
       return 5;
     } else {
@@ -420,7 +452,8 @@ public:
   }
 
   common::Bag <common::DoubleTime>
-  lambda(const typename common::DoubleTime::type &t) const override {
+  lambda(const typename common::DoubleTime::type &t) const override
+  {
 
     std::cout << (t - _last_time) << std::endl;
 
@@ -428,7 +461,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     S1, S2
   };
 
@@ -437,13 +471,16 @@ private:
 };
 
 class ThreeStateModel
-    : public artis::pdevs::Dynamics<common::DoubleTime, ThreeStateModel> {
+    : public artis::pdevs::Dynamics<common::DoubleTime, ThreeStateModel>
+{
 public:
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
-  enum states {
+  enum states
+  {
     HEIGHTS, SPEEDS, SCALES, N, INDEX, SIGMA, LAST_TIME
   };
 
@@ -452,7 +489,8 @@ public:
                                               ThreeStateModel,
                                               artis::common::NoParameters> &context)
       :
-      artis::pdevs::Dynamics<common::DoubleTime, ThreeStateModel>(name, context) {
+      artis::pdevs::Dynamics<common::DoubleTime, ThreeStateModel>(name, context)
+  {
     DECLARE_STATES(std::vector<double>,
                    ((HEIGHTS, &ThreeStateModel::heights), (SPEEDS, &ThreeStateModel::speeds), (SCALES, &ThreeStateModel::scales)));
     DECLARE_STATES(unsigned int,
@@ -467,13 +505,15 @@ public:
 
   void dconf(const typename common::DoubleTime::type &t,
              const typename common::DoubleTime::type &e,
-             const common::Bag <common::DoubleTime> &msgs) override {
+             const common::Bag <common::DoubleTime> &msgs) override
+  {
     dext(t, e, msgs);
   }
 
   void dext(const typename common::DoubleTime::type & /* t */,
             const typename common::DoubleTime::type & /* e */,
-            const common::Bag <common::DoubleTime> &msgs) override {
+            const common::Bag <common::DoubleTime> &msgs) override
+  {
     for (common::Bag<common::DoubleTime>::const_iterator it = msgs.begin();
          it != msgs.end();
          ++it) {
@@ -499,7 +539,8 @@ public:
     }
   }
 
-  void dint(const typename common::DoubleTime::type &t) override {
+  void dint(const typename common::DoubleTime::type &t) override
+  {
     mark_full(t);
     if (full_N()) {
       raz();
@@ -507,7 +548,8 @@ public:
     compute();
   }
 
-  void start(const typename common::DoubleTime::type &t) override {
+  void start(const typename common::DoubleTime::type &t) override
+  {
     heights = {0, 0, 0, 0, 0};
     speeds = {0.21, 0.3, 0.7, 0.56, 0.14};
     scales = {1, 1, 1, 1, 1};
@@ -518,10 +560,12 @@ public:
   }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type & /* t */) const override { return sigma; }
+  ta(const typename common::DoubleTime::type & /* t */) const override
+  { return sigma; }
 
   common::Bag <common::DoubleTime>
-  lambda(const typename common::DoubleTime::type & /* t */) const override {
+  lambda(const typename common::DoubleTime::type & /* t */) const override
+  {
     common::Bag<common::DoubleTime> msgs;
 
     if (full()) {
@@ -531,7 +575,8 @@ public:
   }
 
 private:
-  void compute() {
+  void compute()
+  {
     for (unsigned int i = 0; i < heights.size(); ++i) {
       if (heights[i] != -1 and heights[i] < 10) {
         heights[i] += speeds[i] * scales[i];
@@ -539,7 +584,8 @@ private:
     }
   }
 
-  void display() const {
+  void display() const
+  {
     for (std::vector<double>::const_iterator it = heights.begin();
          it != heights.end(); ++it) {
       std::cout << *it << " ";
@@ -547,7 +593,8 @@ private:
     std::cout << std::endl;
   }
 
-  void display_full() const {
+  void display_full() const
+  {
     unsigned int i = 1;
 
     for (std::vector<double>::const_iterator it = heights.begin();
@@ -559,7 +606,8 @@ private:
     std::cout << std::endl;
   }
 
-  bool full() const {
+  bool full() const
+  {
     unsigned int n = 0;
 
     for (std::vector<double>::const_iterator it = heights.begin();
@@ -571,7 +619,8 @@ private:
     return n > 0;
   }
 
-  bool full_N() const {
+  bool full_N() const
+  {
     unsigned int n = 0;
 
     for (std::vector<double>::const_iterator it = heights.begin();
@@ -583,7 +632,8 @@ private:
     return n >= 2;
   }
 
-  void mark_full(const typename common::DoubleTime::type &t) {
+  void mark_full(const typename common::DoubleTime::type &t)
+  {
     for (std::vector<double>::iterator it = heights.begin();
          it != heights.end(); ++it) {
       if (*it > 10) {
@@ -593,7 +643,8 @@ private:
     }
   }
 
-  void raz() {
+  void raz()
+  {
     for (std::vector<double>::iterator it = heights.begin();
          it != heights.end(); ++it) {
       if (*it == -1) {

+ 8 - 4
src/tests/pdevs/tests.cpp

@@ -36,7 +36,8 @@
 using namespace artis::tests::pdevs;
 using namespace artis::common;
 
-TEST_CASE("pdevs/inactive", "run") {
+TEST_CASE("pdevs/inactive", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::Coordinator<
@@ -47,7 +48,8 @@ TEST_CASE("pdevs/inactive", "run") {
   rc.run(context);
 }
 
-TEST_CASE("pdevs/only_one", "run") {
+TEST_CASE("pdevs/only_one", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::Coordinator<
@@ -93,7 +95,8 @@ TEST_CASE("pdevs/only_one", "run") {
   }
 }
 
-TEST_CASE("pdevs/flat", "run") {
+TEST_CASE("pdevs/flat", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::Coordinator<
@@ -224,7 +227,8 @@ TEST_CASE("pdevs/flat", "run") {
   }
 }
 
-TEST_CASE("pdevs/hierachical", "run") {
+TEST_CASE("pdevs/hierachical", "run")
+{
   artis::common::context::Context<artis::common::DoubleTime> context(0, 10);
   artis::common::RootCoordinator<
       DoubleTime, artis::pdevs::Coordinator<

+ 109 - 52
src/tests/qss/graph_manager.hpp

@@ -31,6 +31,7 @@
 
 #include <artis-star/kernel/pdevs/Coordinator.hpp>
 #include <artis-addons/qss/GraphManager.hpp>
+#include <artis-addons/qss/MultiGraphManager.hpp>
 #include <artis-star/kernel/dtss/Coordinator.hpp>
 #include <artis-star/kernel/dtss/GraphManager.hpp>
 #include <artis-star/kernel/dtss/Policy.hpp>
@@ -40,22 +41,26 @@ namespace tests {
 namespace qss {
 
 class ConstantGraphManager :
-    public artis::qss::GraphManager<common::DoubleTime, Constant> {
+    public artis::qss::GraphManager<common::DoubleTime, Constant>
+{
 public:
   ConstantGraphManager(common::Coordinator<common::DoubleTime> *coordinator,
                        const artis::qss::QSSParameters<artis::common::NoParameters> &parameters,
                        const artis::common::NoParameters &graph_parameters)
       :
       artis::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
-                                                             parameters, graph_parameters) {}
+                                                             parameters, graph_parameters)
+  {}
 
   ~ConstantGraphManager() override = default;
 };
 
 class OnlyOneGraphManager :
-    public artis::qss::GraphManager<common::DoubleTime, Constant> {
+    public artis::qss::GraphManager<common::DoubleTime, Constant>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     A
   };
 
@@ -65,7 +70,8 @@ public:
       :
       artis::qss::GraphManager<common::DoubleTime, Constant>(coordinator,
                                                              parameters, graph_parameters),
-      S("a", parameters, graph_parameters) {
+      S("a", parameters, graph_parameters)
+  {
     add_child(A, &S);
   }
 
@@ -78,23 +84,27 @@ private:
 };
 
 class ParabolaGraphManager :
-    public artis::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters> {
+    public artis::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters>
+{
 public:
   ParabolaGraphManager(common::Coordinator<common::DoubleTime> *coordinator,
                        const artis::qss::QSSParameters<ParabolaParameters> &parameters,
                        const artis::common::NoParameters &graph_parameters)
       :
       artis::qss::GraphManager<common::DoubleTime, Parabola, ParabolaParameters>(
-          coordinator, parameters, graph_parameters) {}
+          coordinator, parameters, graph_parameters)
+  {}
 
   ~ParabolaGraphManager() override = default;
 };
 
 class OnlyOneParabolaGraphManager :
     public artis::pdevs::GraphManager<common::DoubleTime,
-                                      artis::qss::QSSParameters<ParabolaParameters>> {
+                                      artis::qss::QSSParameters<ParabolaParameters>>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     A
   };
 
@@ -104,7 +114,8 @@ public:
       :
       artis::pdevs::GraphManager<common::DoubleTime, artis::qss::QSSParameters<ParabolaParameters>>(
           coordinator, parameters, graph_parameters),
-      S("a", parameters, graph_parameters) {
+      S("a", parameters, graph_parameters)
+  {
     add_child(A, &S);
   }
 
@@ -117,12 +128,13 @@ private:
 };
 
 class PredatorGraphManager :
-    public artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters> {
+    public artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN_X =
-    artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>::RESET
-        + 1
+    artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>::input::RESET + 1
   };
 
   PredatorGraphManager(common::Coordinator<common::DoubleTime> *coordinator,
@@ -130,7 +142,8 @@ public:
                        const artis::common::NoParameters &graph_parameters)
       :
       artis::qss::GraphManager<common::DoubleTime, Predator, PreyPredatorParameters>(
-          coordinator, parameters, graph_parameters) {
+          coordinator, parameters, graph_parameters)
+  {
     coordinator->input_port({IN_X, "in_x"});
     in({coordinator, IN_X}) >> in({derivative(), derivative()->dynamics().IN_X});
   }
@@ -139,11 +152,13 @@ public:
 };
 
 class PreyGraphManager :
-    public artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters> {
+    public artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN_Y =
-    artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>::RESET
+    artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>::input::RESET
         + 1
   };
 
@@ -152,7 +167,8 @@ public:
                    const artis::common::NoParameters &graph_parameters)
       :
       artis::qss::GraphManager<common::DoubleTime, Prey, PreyPredatorParameters>(
-          coordinator, parameters, graph_parameters) {
+          coordinator, parameters, graph_parameters)
+  {
     coordinator->input_port({IN_Y, "in_y"});
     in({coordinator, IN_Y}) >> in({derivative(), derivative()->dynamics().IN_Y});
   }
@@ -160,23 +176,28 @@ public:
   ~PreyGraphManager() override = default;
 };
 
-struct PreyPredatorGraphManagerParameters {
+struct PreyPredatorGraphManagerParameters
+{
   artis::qss::QSSParameters<PreyPredatorParameters> _predator;
   artis::qss::QSSParameters<PreyPredatorParameters> _prey;
 };
 
 class PreyPredatorGraphManager :
-    public artis::pdevs::GraphManager<common::DoubleTime, PreyPredatorGraphManagerParameters> {
+    public artis::pdevs::GraphManager<common::DoubleTime, PreyPredatorGraphManagerParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     PREDATOR, PREY
   };
 
-  enum inputs {
+  enum inputs
+  {
     RESET_X, RESET_Y
   };
 
-  enum outputs {
+  enum outputs
+  {
     OUT_X, OUT_Y
   };
 
@@ -187,7 +208,8 @@ public:
       artis::pdevs::GraphManager<common::DoubleTime, PreyPredatorGraphManagerParameters>(
           coordinator, parameters, graph_parameters),
       _predator("predator", parameters._predator, graph_parameters),
-      _prey("prey", parameters._prey, graph_parameters) {
+      _prey("prey", parameters._prey, graph_parameters)
+  {
     add_child(PREDATOR, &_predator);
     add_child(PREY, &_prey);
 
@@ -196,18 +218,18 @@ public:
     coordinator->output_ports({{OUT_X, "out_x"},
                                {OUT_Y, "out_y"}});
 
-    in({coordinator, RESET_X}) >> in({&_prey, PreyGraphManager::RESET});
+    in({coordinator, RESET_X}) >> in({&_prey, PreyGraphManager::input::RESET});
     in({coordinator, RESET_Y}) >> in({&_prey, PreyGraphManager::IN_Y});
 
     in({coordinator, RESET_X}) >> in({&_predator, PredatorGraphManager::IN_X});
-    in({coordinator, RESET_Y}) >> in({&_predator, PredatorGraphManager::RESET});
+    in({coordinator, RESET_Y}) >> in({&_predator, PredatorGraphManager::input::RESET});
 
-    out({&_prey, PreyGraphManager::OUT}) >> out({coordinator, OUT_X});
-    out({&_predator, PredatorGraphManager::OUT}) >> out({coordinator, OUT_Y});
+    out({&_prey, PreyGraphManager::output::OUT}) >> out({coordinator, OUT_X});
+    out({&_predator, PredatorGraphManager::output::OUT}) >> out({coordinator, OUT_Y});
 
-    out({&_predator, PredatorGraphManager::OUT})
+    out({&_predator, PredatorGraphManager::output::OUT})
         >> in({&_prey, PreyGraphManager::IN_Y});
-    out({&_prey, PreyGraphManager::OUT})
+    out({&_prey, PreyGraphManager::output::OUT})
         >> in({&_predator, PredatorGraphManager::IN_X});
   }
 
@@ -222,16 +244,19 @@ private:
                             artis::qss::QSSParameters<PreyPredatorParameters>> _prey;
 };
 
-struct PreyPredatorSmartGardenerGraphManagerParameters {
+struct PreyPredatorSmartGardenerGraphManagerParameters
+{
   PreyPredatorGraphManagerParameters _prey_predator;
   SmartGardenerParameters _smart_gardener;
 };
 
 class PreyPredatorSmartGardenerGraphManager :
     public artis::pdevs::GraphManager<common::DoubleTime,
-                                      PreyPredatorSmartGardenerGraphManagerParameters> {
+                                      PreyPredatorSmartGardenerGraphManagerParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     PREY_PREDATOR, SMART_GARDENER
   };
 
@@ -245,7 +270,8 @@ public:
           coordinator, parameters, graph_parameters),
       _prey_predator("prey_predator", parameters._prey_predator,
                      graph_parameters),
-      _smart_gardener("smart_gardener", parameters._smart_gardener) {
+      _smart_gardener("smart_gardener", parameters._smart_gardener)
+  {
     add_child(PREY_PREDATOR, &_prey_predator);
     add_child(SMART_GARDENER, &_smart_gardener);
 
@@ -271,15 +297,19 @@ private:
 };
 
 class DiscretePredatorGraphManager :
-    public artis::dtss::GraphManager<artis::common::DoubleTime, DiscretePreyPredatorParameters> {
+    public artis::dtss::GraphManager<artis::common::DoubleTime, DiscretePreyPredatorParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     PREDATOR
   };
-  enum inputs {
+  enum inputs
+  {
     RESET, IN_X
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
 
@@ -291,7 +321,8 @@ public:
       artis::dtss::GraphManager<artis::common::DoubleTime, DiscretePreyPredatorParameters>(
           coordinator, parameters, graph_parameters
       ),
-      _predator("predator", parameters) {
+      _predator("predator", parameters)
+  {
     add_child(PREDATOR, &_predator);
 
     coordinator->input_ports({{RESET, "reset"},
@@ -311,24 +342,29 @@ private:
                          DiscretePreyPredatorParameters> _predator;
 };
 
-struct MixedPreyPredatorGraphManagerParameters {
+struct MixedPreyPredatorGraphManagerParameters
+{
   DiscretePreyPredatorParameters _predator;
   artis::qss::QSSParameters<PreyPredatorParameters> _prey;
 };
 
 class MixedPreyPredatorGraphManager :
     public artis::pdevs::GraphManager<artis::common::DoubleTime,
-                                      MixedPreyPredatorGraphManagerParameters> {
+                                      MixedPreyPredatorGraphManagerParameters>
+{
 public:
-  enum submodels {
+  enum submodels
+  {
     PREDATOR, PREY
   };
 
-  enum inputs {
+  enum inputs
+  {
     RESET_X, RESET_Y
   };
 
-  enum outputs {
+  enum outputs
+  {
     OUT_X, OUT_Y
   };
 
@@ -341,7 +377,8 @@ public:
                                  MixedPreyPredatorGraphManagerParameters>(
           coordinator, parameters, graph_parameters),
       _predator("predator", parameters._predator, graph_parameters),
-      _prey("prey", parameters._prey, graph_parameters) {
+      _prey("prey", parameters._prey, graph_parameters)
+  {
     add_child(PREDATOR, &_predator);
     add_child(PREY, &_prey);
 
@@ -350,15 +387,15 @@ public:
     coordinator->output_ports({{OUT_X, "out_x"},
                                {OUT_Y, "out_y"}});
 
-    in({coordinator, RESET_X}) >> in({&_prey, PreyGraphManager::RESET});
-    in({coordinator, RESET_Y}) >> in({&_predator, PredatorGraphManager::RESET});
+    in({coordinator, RESET_X}) >> in({&_prey, PreyGraphManager::input::RESET});
+    in({coordinator, RESET_Y}) >> in({&_predator, PredatorGraphManager::input::RESET});
 
-    out({&_prey, PreyGraphManager::OUT}) >> out({coordinator, OUT_X});
-    out({&_predator, PredatorGraphManager::OUT}) >> out({coordinator, OUT_Y});
+    out({&_prey, PreyGraphManager::output::OUT}) >> out({coordinator, OUT_X});
+    out({&_predator, PredatorGraphManager::output::OUT}) >> out({coordinator, OUT_Y});
 
-    out({&_predator, PredatorGraphManager::OUT})
+    out({&_predator, PredatorGraphManager::output::OUT})
         >> in({&_prey, PreyGraphManager::IN_Y});
-    out({&_prey, PreyGraphManager::OUT})
+    out({&_prey, PreyGraphManager::output::OUT})
         >> in({&_predator, PredatorGraphManager::IN_X});
   }
 
@@ -374,6 +411,26 @@ private:
                             artis::qss::QSSParameters<PreyPredatorParameters>> _prey;
 };
 
+class MultiPreyPredatorGraphManager :
+    public artis::qss::MultiGraphManager<common::DoubleTime,
+                                         PreyPredator,
+                                         PreyPredatorParameters>
+{
+public:
+  MultiPreyPredatorGraphManager(common::Coordinator<common::DoubleTime> *coordinator,
+                                const artis::qss::MultiQSSParameters<
+                                    PreyPredatorParameters> &parameters,
+                                const artis::common::NoParameters &graph_parameters)
+      :
+      artis::qss::MultiGraphManager<common::DoubleTime,
+                                    PreyPredator,
+                                    PreyPredatorParameters>(
+          coordinator, parameters, graph_parameters)
+  {}
+
+  ~MultiPreyPredatorGraphManager() override = default;
+};
+
 }
 }
 } // namespace artis tests qss

+ 123 - 59
src/tests/qss/main.cpp

@@ -36,16 +36,20 @@
 
 using namespace artis::tests::qss;
 
-void test_parabola() {
+void test_parabola()
+{
   artis::qss::QSSParameters<ParabolaParameters> parameters = {{0.5},
                                                               {true, true, 0.001, 3},
                                                               {0.2}};
 
-  class View : public artis::observer::View<artis::common::DoubleTime> {
+  class View : public artis::observer::View<artis::common::DoubleTime>
+  {
   public:
-    View() {
-      selector("Value", {OnlyOneParabolaGraphManager::A, ParabolaGraphManager::S_Integrator,
-                         artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+    View()
+    {
+      selector("Value",
+               {OnlyOneParabolaGraphManager::A, ParabolaGraphManager::submodel::S_Integrator,
+                artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
     }
   };
 
@@ -71,20 +75,23 @@ void test_parabola() {
   }
 }
 
-class PredatorPreyView : public artis::observer::View<artis::common::DoubleTime> {
+class PredatorPreyView : public artis::observer::View<artis::common::DoubleTime>
+{
 public:
-  PredatorPreyView() {
+  PredatorPreyView()
+  {
     selector("PredatorView",
-             {PreyPredatorGraphManager::PREDATOR, PredatorGraphManager::S_Integrator,
-              artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+             {PreyPredatorGraphManager::PREDATOR, PredatorGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
     selector("PreyView",
-             {PreyPredatorGraphManager::PREY, PreyGraphManager::S_Integrator,
-              artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+             {PreyPredatorGraphManager::PREY, PreyGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
   }
 };
 
 void run_predator_prey(artis::common::context::Context<artis::common::DoubleTime> &context,
-                       const PreyPredatorGraphManagerParameters &parameters) {
+                       const PreyPredatorGraphManagerParameters &parameters)
+{
   artis::common::RootCoordinator<
       artis::common::DoubleTime, artis::pdevs::Coordinator<
           artis::common::DoubleTime,
@@ -96,40 +103,45 @@ void run_predator_prey(artis::common::context::Context<artis::common::DoubleTime
 
   rc.run(context);
 
-  rc.save(context);
-
-  std::ofstream os("state");
-  boost::archive::binary_oarchive oa(os);
-
-  oa << context;
-
-  {
-    artis::observer::DiscreteTimeIterator<artis::common::DoubleTime> it(
-        rc.observer().view("Value").get("PredatorView"), context.begin(), 0.1);
-
-    while (it.has_next()) {
-      double v;
-
-      (*it).second(v);
-      std::cout << (*it).first << ";" << v << std::endl;
-      ++it;
-    }
-  }
-  {
-    artis::observer::DiscreteTimeIterator<artis::common::DoubleTime> it(
-        rc.observer().view("Value").get("PreyView"), context.begin(), 0.1);
+  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
 
-    while (it.has_next()) {
-      double v;
+  output(0, 100, 0.1);
 
-      (*it).second(v);
-      std::cout << (*it).first << ";" << v << std::endl;
-      ++it;
-    }
-  }
+  //  rc.save(context);
+//
+//  std::ofstream os("state");
+//  boost::archive::binary_oarchive oa(os);
+//
+//  oa << context;
+//
+//  {
+//    artis::observer::DiscreteTimeIterator<artis::common::DoubleTime> it(
+//        rc.observer().view("Value").get("PredatorView"), context.begin(), 0.1);
+//
+//    while (it.has_next()) {
+//      double v;
+//
+//      (*it).second(v);
+//      std::cout << (*it).first << ";" << v << std::endl;
+//      ++it;
+//    }
+//  }
+//  {
+//    artis::observer::DiscreteTimeIterator<artis::common::DoubleTime> it(
+//        rc.observer().view("Value").get("PreyView"), context.begin(), 0.1);
+//
+//    while (it.has_next()) {
+//      double v;
+//
+//      (*it).second(v);
+//      std::cout << (*it).first << ";" << v << std::endl;
+//      ++it;
+//    }
+//  }
 }
 
-void test_predator_prey() {
+void test_predator_prey()
+{
   PreyPredatorGraphManagerParameters parameters = {{{45.},
                                                     {true, true, 0.1, 3},
                                                     {0.5, 0.01, 0.01, 0.2}},
@@ -141,27 +153,30 @@ void test_predator_prey() {
 
   run_predator_prey(context, parameters);
 
-  artis::common::context::Context<artis::common::DoubleTime> new_context(context);
-
-  new_context.end(200);
-  run_predator_prey(new_context, parameters);
+//  artis::common::context::Context<artis::common::DoubleTime> new_context(context);
+//
+//  new_context.end(200);
+//  run_predator_prey(new_context, parameters);
 }
 
-class PredatorPreySmartGardenerView : public artis::observer::View<artis::common::DoubleTime> {
+class PredatorPreySmartGardenerView : public artis::observer::View<artis::common::DoubleTime>
+{
 public:
-  PredatorPreySmartGardenerView() {
+  PredatorPreySmartGardenerView()
+  {
     selector("PredatorView",
              {PreyPredatorSmartGardenerGraphManager::PREY_PREDATOR,
-              PreyPredatorGraphManager::PREDATOR, PredatorGraphManager::S_Integrator,
-              artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+              PreyPredatorGraphManager::PREDATOR, PredatorGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
     selector("PreyView",
              {PreyPredatorSmartGardenerGraphManager::PREY_PREDATOR,
-              PreyPredatorGraphManager::PREY, PreyGraphManager::S_Integrator,
-              artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+              PreyPredatorGraphManager::PREY, PreyGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
   }
 };
 
-void test_predator_prey_smart_gardener() {
+void test_predator_prey_smart_gardener()
+{
   PreyPredatorSmartGardenerGraphManagerParameters parameters = {{{{45.},
                                                                   {true, true, 0.1, 3},
                                                                   {0.5, 0.01, 0.01, 0.2}},
@@ -187,19 +202,22 @@ void test_predator_prey_smart_gardener() {
   output(0, 100, 0.1);
 }
 
-class MixedPredatorPreyView : public artis::observer::View<artis::common::DoubleTime> {
+class MixedPredatorPreyView : public artis::observer::View<artis::common::DoubleTime>
+{
 public:
-  MixedPredatorPreyView() {
+  MixedPredatorPreyView()
+  {
     selector("PredatorView",
              {MixedPreyPredatorGraphManager::PREDATOR, DiscretePredatorGraphManager::PREDATOR,
               DiscretePredator::VALUE});
     selector("PreyView",
-             {MixedPreyPredatorGraphManager::PREY, PreyGraphManager::S_Integrator,
-              artis::qss::Integrator<artis::common::DoubleTime>::VALUE});
+             {MixedPreyPredatorGraphManager::PREY, PreyGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
   }
 };
 
-void test_mixed_predator_prey() {
+void test_mixed_predator_prey()
+{
   MixedPreyPredatorGraphManagerParameters parameters = {{0.0001, 45., 0.5, 0.01, 0.01, 0.2},
                                                         {{5000.},
                                                          {true, true, 1, 3},
@@ -221,9 +239,55 @@ void test_mixed_predator_prey() {
   output(0, 100, 0.1);
 }
 
-int main() {
+class MultiPredatorPreyView : public artis::observer::View<artis::common::DoubleTime>
+{
+public:
+  MultiPredatorPreyView()
+  {
+    selector("PredatorView",
+             {MultiPreyPredatorGraphManager::submodel::S_Integrator,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
+    selector("PreyView",
+             {MultiPreyPredatorGraphManager::submodel::S_Integrator + 1,
+              artis::qss::Integrator<artis::common::DoubleTime>::var::VALUE});
+    selector("PredatorDerivativeView",
+             {MultiPreyPredatorGraphManager::submodel::S_Derivative,
+              PreyPredator::var::VALUE});
+    selector("PreyDerivativeView",
+             {MultiPreyPredatorGraphManager::submodel::S_Derivative,
+              PreyPredator::var::VALUE + 1});
+  }
+};
+
+void test_multi_predator_prey()
+{
+  artis::qss::MultiQSSParameters<PreyPredatorParameters> parameters = {
+      {{5000.}, {45.}},
+      {{true, true, 1, 3}, {true, true, 0.1, 3}},
+      {0.5, 0.01, 0.01, 0.2}
+  };
+  artis::common::context::Context<artis::common::DoubleTime> context(0, 100);
+  artis::common::RootCoordinator<
+      artis::common::DoubleTime, artis::pdevs::Coordinator<
+          artis::common::DoubleTime,
+          MultiPreyPredatorGraphManager,
+          artis::qss::MultiQSSParameters<PreyPredatorParameters>>
+  > rc(context, "root", parameters, artis::common::NoParameters());
+
+  rc.attachView("Value4", new MultiPredatorPreyView());
+
+  rc.run(context);
+
+  artis::observer::Output<artis::common::DoubleTime> output(rc.observer());
+
+  output(0, 100, 0.1);
+}
+
+int main()
+{
   test_parabola();
   test_predator_prey();
   test_predator_prey_smart_gardener();
   test_mixed_predator_prey();
+  test_multi_predator_prey();
 }

+ 108 - 35
src/tests/qss/models.hpp

@@ -31,13 +31,15 @@
 #include <artis-star/common/utils/Trace.hpp>
 
 #include <artis-star/kernel/qss/Derivative.hpp>
+#include <artis-star/kernel/qss/MultiDerivative.hpp>
 #include <artis-star/kernel/dtss/Dynamics.hpp>
 
 namespace artis {
 namespace tests {
 namespace qss {
 
-class Constant : public artis::qss::Derivative<common::DoubleTime, Constant> {
+class Constant : public artis::qss::Derivative<common::DoubleTime, Constant>
+{
 public:
   Constant(const std::string &name,
            const artis::pdevs::Context<common::DoubleTime,
@@ -45,32 +47,38 @@ public:
                                        artis::common::NoParameters> &context)
       :
       artis::qss::Derivative<common::DoubleTime, Constant>(name,
-                                                           context) {}
+                                                           context)
+  {}
 
   ~Constant() override = default;
 
-  double compute() const override { return 0.5; }
+  double compute() const override
+  { return 0.5; }
 };
 
-struct ParabolaParameters {
+struct ParabolaParameters
+{
   double alpha;
 };
 
 class Parabola
-    : public artis::qss::Derivative<common::DoubleTime, Parabola, ParabolaParameters> {
+    : public artis::qss::Derivative<common::DoubleTime, Parabola, ParabolaParameters>
+{
 public:
   Parabola(const std::string &name,
            const artis::pdevs::Context<common::DoubleTime, Parabola, ParabolaParameters> &context)
       :
       artis::qss::Derivative<common::DoubleTime, Parabola, ParabolaParameters>(
           name,
-          context), _alpha(context.parameters().alpha) {
+          context), _alpha(context.parameters().alpha)
+  {
     internal("X", &Parabola::_x);
   }
 
   ~Parabola() override = default;
 
-  double compute() const override { return _alpha * _x; }
+  double compute() const override
+  { return _alpha * _x; }
 
 private:
   double _alpha;
@@ -78,7 +86,8 @@ private:
   double _x;
 };
 
-struct PreyPredatorParameters {
+struct PreyPredatorParameters
+{
   double a;
   double b;
   double d;
@@ -86,7 +95,8 @@ struct PreyPredatorParameters {
 };
 
 class Predator
-    : public artis::qss::Derivative<common::DoubleTime, Predator, PreyPredatorParameters> {
+    : public artis::qss::Derivative<common::DoubleTime, Predator, PreyPredatorParameters>
+{
 public:
   unsigned int IN_X;
 
@@ -98,14 +108,16 @@ public:
       artis::qss::Derivative<common::DoubleTime, Predator, PreyPredatorParameters>(
           name,
           context), _b(context.parameters().b), _d(context.parameters().d),
-      _e(context.parameters().e) {
+      _e(context.parameters().e)
+  {
     internal("Y", &Predator::_y);
     IN_X = external("X", &Predator::_x);
   }
 
   ~Predator() override = default;
 
-  double compute() const override { return _b * _d * _x * _y - _e * _y; }
+  double compute() const override
+  { return _b * _d * _x * _y - _e * _y; }
 
 private:
   // parameters
@@ -119,7 +131,8 @@ private:
 };
 
 class Prey
-    : public artis::qss::Derivative<common::DoubleTime, Prey, PreyPredatorParameters> {
+    : public artis::qss::Derivative<common::DoubleTime, Prey, PreyPredatorParameters>
+{
 public:
   unsigned int IN_Y;
 
@@ -128,14 +141,16 @@ public:
       :
       artis::qss::Derivative<common::DoubleTime, Prey, PreyPredatorParameters>(
           name,
-          context), _a(context.parameters().a), _b(context.parameters().b) {
+          context), _a(context.parameters().a), _b(context.parameters().b)
+  {
     internal("X", &Prey::_x);
     IN_Y = external("Y", &Prey::_y);
   }
 
   ~Prey() override = default;
 
-  double compute() const override { return _a * _x - _b * _y * _x; }
+  double compute() const override
+  { return _a * _x - _b * _y * _x; }
 
 private:
   // parameters
@@ -147,7 +162,8 @@ private:
   double _y;
 };
 
-struct SmartGardenerParameters {
+struct SmartGardenerParameters
+{
   double threshold;
   double prey_proportion;
   double predator_proportion;
@@ -155,12 +171,15 @@ struct SmartGardenerParameters {
 };
 
 class SmartGardener
-    : public artis::pdevs::Dynamics<common::DoubleTime, SmartGardener, SmartGardenerParameters> {
+    : public artis::pdevs::Dynamics<common::DoubleTime, SmartGardener, SmartGardenerParameters>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     IN_X, IN_Y
   };
-  enum outputs {
+  enum outputs
+  {
     OUT_X, OUT_Y
   };
 
@@ -174,7 +193,8 @@ public:
       _threshold(context.parameters().threshold),
       _prey_proportion(context.parameters().prey_proportion),
       _predator_proportion(context.parameters().predator_proportion),
-      _delay(context.parameters().delay) {
+      _delay(context.parameters().delay)
+  {
     input_ports({{IN_X, "in_x"},
                  {IN_Y, "in_y"}});
     output_ports({{OUT_X, "out_x"},
@@ -183,7 +203,8 @@ public:
 
   ~SmartGardener() override = default;
 
-  void dint(const typename common::DoubleTime::type & /* t */) override {
+  void dint(const typename common::DoubleTime::type & /* t */) override
+  {
     switch (_phase) {
     case INIT:_phase = IDLE;
       _sigma = _delay;
@@ -205,7 +226,8 @@ public:
   void
   dext(const typename common::DoubleTime::type & /* t */,
        const typename common::DoubleTime::type &e,
-       const common::Bag<common::DoubleTime> &bag) override {
+       const common::Bag<common::DoubleTime> &bag) override
+  {
     std::for_each(bag.begin(), bag.end(),
                   [this](const common::ExternalEvent<common::DoubleTime> &event) {
                     artis::qss::IntegratorData data;
@@ -221,10 +243,12 @@ public:
   }
 
   void
-  start(const typename common::DoubleTime::type & /* t */) override { _phase = INIT; }
+  start(const typename common::DoubleTime::type & /* t */) override
+  { _phase = INIT; }
 
   typename common::DoubleTime::type
-  ta(const typename common::DoubleTime::type & /* t */) const override {
+  ta(const typename common::DoubleTime::type & /* t */) const override
+  {
     switch (_phase) {
     case INIT:return 0.0;
     case IDLE:return _sigma;
@@ -234,7 +258,8 @@ public:
   }
 
   common::Bag<common::DoubleTime>
-  lambda(const typename common::DoubleTime::type & /* t */) const override {
+  lambda(const typename common::DoubleTime::type & /* t */) const override
+  {
     common::Bag<common::DoubleTime> bag;
 
     if (_phase == PEST) {
@@ -248,7 +273,8 @@ public:
   }
 
 private:
-  enum Phase {
+  enum Phase
+  {
     INIT, IDLE, PEST
   };
 
@@ -265,7 +291,8 @@ private:
   double _predator_amount;
 };
 
-struct DiscretePreyPredatorParameters {
+struct DiscretePreyPredatorParameters
+{
   artis::common::DoubleTime::type time_step;
   double init_value;
   double a;
@@ -277,15 +304,19 @@ struct DiscretePreyPredatorParameters {
 class DiscretePredator
     : public artis::dtss::Dynamics<artis::common::DoubleTime,
                                    DiscretePredator,
-                                   DiscretePreyPredatorParameters> {
+                                   DiscretePreyPredatorParameters>
+{
 public:
-  enum inputs {
+  enum inputs
+  {
     RESET, IN_X, IN_Y
   };
-  enum outputs {
+  enum outputs
+  {
     OUT
   };
-  enum vars {
+  enum vars
+  {
     VALUE
   };
 
@@ -299,7 +330,8 @@ public:
                             DiscretePreyPredatorParameters>(
           name, context), _init_value(context.parameters().init_value),
       _b(context.parameters().b), _d(context.parameters().d),
-      _e(context.parameters().e) {
+      _e(context.parameters().e)
+  {
     input_ports({{RESET, "reset"},
                  {IN_X, "in_x"},
                  {IN_Y, "in_y"}});
@@ -310,7 +342,8 @@ public:
   ~DiscretePredator() override = default;
 
   void transition(const artis::common::Bag<artis::common::DoubleTime> &bag,
-                  const artis::common::DoubleTime::type & /* t */) override {
+                  const artis::common::DoubleTime::type & /* t */) override
+  {
     std::for_each(bag.begin(), bag.end(),
                   [this](const artis::common::ExternalEvent<artis::common::DoubleTime> &event) {
                     if (event.on_port(IN_X)) {
@@ -325,12 +358,14 @@ public:
     _y += (_b * _d * _x * _y - _e * _y) * time_step();
   }
 
-  void start(const artis::common::DoubleTime::type & /* t */) override {
+  void start(const artis::common::DoubleTime::type & /* t */) override
+  {
     _y = _init_value;
   }
 
   artis::common::Bag<artis::common::DoubleTime>
-  lambda(const artis::common::DoubleTime::type & /* t */) const override {
+  lambda(const artis::common::DoubleTime::type & /* t */) const override
+  {
     artis::common::Bag<artis::common::DoubleTime> msgs;
     artis::qss::IntegratorData data = {_y};
 
@@ -340,7 +375,8 @@ public:
   }
 
   artis::common::Value observe(const artis::common::DoubleTime::type & /* t */,
-                               unsigned int index) const override {
+                               unsigned int index) const override
+  {
     if (index == VALUE) {
       return (double) _y;
     }
@@ -359,6 +395,43 @@ private:
   double _y;
 };
 
+class PreyPredator
+    : public artis::qss::MultiDerivative<common::DoubleTime, PreyPredator, PreyPredatorParameters>
+{
+public:
+  PreyPredator(const std::string &name,
+               const artis::pdevs::Context<common::DoubleTime, PreyPredator,
+                                           PreyPredatorParameters> &context)
+      :
+      artis::qss::MultiDerivative<common::DoubleTime, PreyPredator, PreyPredatorParameters>(
+          name, context),
+      _a(context.parameters().a), _b(context.parameters().b),
+      _d(context.parameters().d), _e(context.parameters().e)
+  {
+    internal("X", &PreyPredator::_x);
+    internal("Y", &PreyPredator::_y);
+  }
+
+  ~PreyPredator() override = default;
+
+  std::vector<double> compute() override
+  {
+    return {_a * _x - _b * _y * _x,
+            _b * _d * _x * _y - _e * _y};
+  }
+
+private:
+  // parameters
+  double _a;
+  double _b;
+  double _d;
+  double _e;
+
+  // state
+  double _x;
+  double _y;
+};
+
 }
 }
 } // namespace artis tests qss