Skip to content

Commit

Permalink
Lenghtened the loop count for RandomMinute and gcc7
Browse files Browse the repository at this point in the history
  • Loading branch information
jwgrenning committed Sep 15, 2017
1 parent 8f5d449 commit 0d239ef
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion code-t0/tests/HomeAutomation/RandomMinuteTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TEST(RandomMinute, AllValuesPossible)
int hit[2*BOUND + 1];
memset(hit, 0, sizeof(hit));
int i;
for (i = 0; i < 300; i++)
for (i = 0; i < 350; i++)
{
minute = RandomMinute_Get();
AssertMinuteIsInRange();
Expand Down
42 changes: 21 additions & 21 deletions code-t1/tests/HomeAutomation/RandomMinuteTest.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------


//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------


#include "CppUTest/TestHarness.h"

extern "C"
Expand All @@ -33,7 +33,7 @@ TEST_GROUP(RandomMinute)

void setup()
{
RandomMinute_Create(BOUND);
RandomMinute_Create(BOUND);
srand(1);
}

Expand Down Expand Up @@ -64,7 +64,7 @@ TEST(RandomMinute, AllValuesPossible)
int hit[2*BOUND + 1];
memset(hit, 0, sizeof(hit));

for (int i = 0; i < 300; i++)
for (int i = 0; i < 350; i++)
{
minute = RandomMinute_Get();
if (minute < -BOUND || minute > BOUND)
Expand Down
42 changes: 21 additions & 21 deletions code-t2/tests/HomeAutomation/RandomMinuteTest.cpp
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------

//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------

#include "CppUTest/TestHarness.h"

extern "C"
{
#include <stdio.h>
#include <stdio.h>
#include <string.h>
#include "RandomMinute.h"
}
Expand All @@ -32,7 +32,7 @@ TEST_GROUP(RandomMinute)

void setup()
{
RandomMinute_Create(Bound);
RandomMinute_Create(Bound);
srand(1);
}

Expand Down Expand Up @@ -63,7 +63,7 @@ TEST(RandomMinute, AllValuesPossible)
int hit[2*Bound + 1];
memset(hit, 0, sizeof(hit));

for (int i = 0; i < 300; i++)
for (int i = 0; i < 350; i++)
{
minute = RandomMinute_Get();
if (minute < -Bound || minute > Bound)
Expand Down
40 changes: 20 additions & 20 deletions code-t3/tests/HomeAutomation/RandomMinuteTest.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------

//- ------------------------------------------------------------------
//- Copyright (c) James W. Grenning -- All Rights Reserved
//- For use by owners of Test-Driven Development for Embedded C,
//- and attendees of Renaissance Software Consulting, Co. training
//- classes.
//-
//- Available at http://pragprog.com/titles/jgade/
//- ISBN 1-934356-62-X, ISBN13 978-1-934356-62-3
//-
//- Authorized users may use this source code in your own
//- projects, however the source code may not be used to
//- create training material, courses, books, articles, and
//- the like. We make no guarantees that this source code is
//- fit for any purpose.
//-
//- www.renaissancesoftware.net [email protected]
//- ------------------------------------------------------------------

#include "CppUTest/TestHarness.h"

extern "C"
Expand All @@ -32,7 +32,7 @@ TEST_GROUP(RandomMinute)

void setup()
{
RandomMinute_Create(Bound);
RandomMinute_Create(Bound);
srand(1);
}

Expand Down Expand Up @@ -63,7 +63,7 @@ TEST(RandomMinute, AllValuesPossible)
int hit[2*Bound + 1];
memset(hit, 0, sizeof(hit));

for (int i = 0; i < 300; i++)
for (int i = 0; i < 350; i++)
{
minute = RandomMinute_Get();
if (minute < -Bound || minute > Bound)
Expand Down

0 comments on commit 0d239ef

Please sign in to comment.