From 07b929e13f0cefe41eef8b33f533aa4b5945a4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 25 Dec 2015 17:48:15 +0100 Subject: [PATCH] Added TODO test case for unknown evaluation order --- test/testother.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/testother.cpp b/test/testother.cpp index 7d34ade72..1ce4c4105 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -6113,10 +6113,19 @@ private: ASSERT_EQUALS("[test.cpp:2]: (error) Expression '++exp,(char**)&exp' depends on order of evaluation of side effects\n", errout.str()); // sequence points - check("void f(int id) {\n" - " id = dostuff(id += 42);\n" - "}"); - ASSERT_EQUALS("", errout.str()); + { + // FP + check("void f(int id) {\n" + " id = dostuff(id += 42);\n" + "}"); + ASSERT_EQUALS("", errout.str()); + + // FN + check("void f(int id) {\n" + " id = id + dostuff(id += 42);\n" + "}"); + TODO_ASSERT_EQUALS("error", "", errout.str()); + } } };