From 40ee4a1f29aefc7f4ed71ac24c7f8718638b9c69 Mon Sep 17 00:00:00 2001
From: Tom Fischer <thomas.fischer@ufz.de>
Date: Fri, 18 Oct 2024 09:56:02 +0200
Subject: [PATCH] [T] Add simple test for
 NumLib::createIterationNumberBasedTimeStepping()

---
 ...CreateIterationNumberBasedTimeStepping.cpp | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Tests/NumLib/CreateIterationNumberBasedTimeStepping.cpp

diff --git a/Tests/NumLib/CreateIterationNumberBasedTimeStepping.cpp b/Tests/NumLib/CreateIterationNumberBasedTimeStepping.cpp
new file mode 100644
index 00000000000..981a587e792
--- /dev/null
+++ b/Tests/NumLib/CreateIterationNumberBasedTimeStepping.cpp
@@ -0,0 +1,30 @@
+/**
+ * \file
+ * \copyright
+ * Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org)
+ *            Distributed under a Modified BSD License.
+ *              See accompanying file LICENSE.txt or
+ *              http://www.opengeosys.org/project/license
+ *
+ */
+
+#include "NumLib/TimeStepping/Algorithms/CreateIterationNumberBasedTimeStepping.h"
+
+#include <gtest/gtest.h>
+
+#include <numeric>
+
+#include "NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h"
+
+TEST(NumLibCreateIterationNumberBasedTimeStepping,
+     InitialTimeGreaterThanEndTime)
+{
+    double const t_initial = 1;
+    double const t_end = 0;
+
+    NumLib::IterationNumberBasedTimeSteppingParameters parameters{
+        t_initial, t_end, 0, 0, 0, {}, {}};
+    EXPECT_ANY_THROW(auto fixed_time_step_algorithm =
+                         NumLib::createIterationNumberBasedTimeStepping(
+                             std::move(parameters), {}));
+}
-- 
GitLab