From 4e1aa95a1d6524521971dd06ef6f6daf7c465971 Mon Sep 17 00:00:00 2001
From: Terraneo Federico <fede.tft@miosix.org>
Date: Mon, 14 Nov 2016 10:51:19 +0100
Subject: [PATCH] Fixed a bug in the testsuite that causes an incorrect number
 of enableInterrupts() to be called upon some test failure

---
 miosix/_tools/testsuite/testsuite.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/miosix/_tools/testsuite/testsuite.cpp b/miosix/_tools/testsuite/testsuite.cpp
index e3e76d9d..10c8d09f 100644
--- a/miosix/_tools/testsuite/testsuite.cpp
+++ b/miosix/_tools/testsuite/testsuite.cpp
@@ -1983,11 +1983,13 @@ static void test_9()
     delayMs(100);
     if(t9_v1)
     {
+        enableInterrupts();
         enableInterrupts();
         fail("disableInterrups() nesting (2)");
     }
     if(areInterruptsEnabled()==true)
     {
+        enableInterrupts();
         enableInterrupts();
         fail("areInterruptsEnabled() (3)");
     }
@@ -2007,7 +2009,6 @@ static void test_9()
     delayMs(100);
     if(t9_v1==false)
     {
-        enableInterrupts();
         fail("enableInterrupts() nesting (2)");
     }
     if(areInterruptsEnabled()==false) fail("areInterruptsEnabled() (5)");
-- 
GitLab