From 47914b99607a1ab650d6c4648b3c83fcc22dffd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 22 Oct 2020 07:39:57 +0200 Subject: [PATCH] Crash: Add regression test --- test/testcondition.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/testcondition.cpp b/test/testcondition.cpp index cf0e0fb88..8bfd849a5 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -3838,6 +3838,14 @@ private: " }\n" "}\n"); ASSERT_EQUALS("", errout.str()); + + // do not crash + check("void assign(const MMA& other) {\n" + " if (mPA.cols != other.mPA.cols || mPA.rows != other.mPA.rows)\n" + " ;\n" + " if (other.mPA.cols > 0 && other.mPA.rows > 0)\n" + " ;\n" + "}"); } void checkInvalidTestForOverflow() {