Skip to content

Commit

Permalink
Fixed compilation issue now that we are using RapidAssist v0.9.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
end2endzone committed Apr 5, 2021
1 parent 2cc8fc5 commit ed88769
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions test/TestWin32Arduino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#include "util/atomic.h" //for ATOMIC_BLOCK and NONATOMIC_BLOCK macros
#include "RealtimeClockStrategy.h"
#include "IncrementalClockStrategy.h"
#include "rapidassist/gtesthelp.h"
#include "rapidassist/testing.h"
#include "rapidassist/filesystem.h"
#include "rapidassist/time_.h"
#include "rapidassist/timing.h"

namespace arduino { namespace test
{
Expand Down Expand Up @@ -93,10 +93,10 @@ namespace arduino { namespace test
static const uint32_t EXPECTED_ELAPSED_MILLIS = 1000;
static const uint32_t EXPECTED_ELAPSED_MICROS = EXPECTED_ELAPSED_MILLIS*1000;

ra::time::waitNextSecond(); //synchronize to a new second in wall clock
ra::timing::WaitNextSecond(); //synchronize to a new second in wall clock

uint32_t value1 = micros();
ra::time::waitNextSecond(); //loop for 1 second
ra::timing::WaitNextSecond(); //loop for 1 second
uint32_t value2 = micros();

ASSERT_GT(value2, value1);
Expand All @@ -111,10 +111,10 @@ namespace arduino { namespace test

static const uint32_t EXPECTED_ELAPSED_MILLIS = 1000; //1 second

ra::time::waitNextSecond(); //synchronize to a new second in wall clock
ra::timing::WaitNextSecond(); //synchronize to a new second in wall clock

uint32_t value1 = millis();
ra::time::waitNextSecond(); //loop for 1 second
ra::timing::WaitNextSecond(); //loop for 1 second
uint32_t value2 = millis();

ASSERT_GT(value2, value1);
Expand Down Expand Up @@ -406,10 +406,10 @@ namespace arduino { namespace test
} __logFilePop;

//create new log file
std::string logFile = ra::gtesthelp::getTestQualifiedName();
if (ra::filesystem::fileExists(logFile.c_str()))
std::string logFile = ra::testing::GetTestQualifiedName();
if (ra::filesystem::FileExists(logFile.c_str()))
{
ASSERT_TRUE( ra::filesystem::deleteFile(logFile.c_str()) );
ASSERT_TRUE( ra::filesystem::DeleteFile(logFile.c_str()) );
}
testarduino::setLogFile(logFile.c_str());

Expand All @@ -427,7 +427,7 @@ namespace arduino { namespace test

//load log file
ra::strings::StringVector lines;
ASSERT_TRUE( ra::gtesthelp::getTextFileContent(logFile.c_str(), lines) );
ASSERT_TRUE( ra::filesystem::ReadTextFile(logFile.c_str(), lines) );
ASSERT_EQ(std::string("1001110"), lines[0]);
ASSERT_EQ(std::string("116"), lines[1]);
ASSERT_EQ(std::string("78"), lines[2]);
Expand Down
12 changes: 6 additions & 6 deletions test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@

#include <gtest/gtest.h>

#include "rapidassist/gtesthelp.h"
#include "rapidassist/environment.h"

using namespace ra::gtesthelp;
using namespace ra::environment;

int main(int argc, char **argv)
{
//define default values for xml output report
if (isProcessorX86())
if (IsProcess32Bit())
{
if (isDebugCode())
if (IsConfigurationDebug())
::testing::GTEST_FLAG(output) = "xml:win32arduino_unittest.x86.debug.xml";
else
::testing::GTEST_FLAG(output) = "xml:win32arduino_unittest.x86.release.xml";
}
else if (isProcessorX64())
else if (IsProcess64Bit())
{
if (isDebugCode())
if (IsConfigurationDebug())
::testing::GTEST_FLAG(output) = "xml:win32arduino_unittest.x64.debug.xml";
else
::testing::GTEST_FLAG(output) = "xml:win32arduino_unittest.x64.release.xml";
Expand Down

0 comments on commit ed88769

Please sign in to comment.