Commit 7d6257ec authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #551: a test in real system should be done but I'm confident this will fix it. (#552)

parent d130808b
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ public:
	}
	
	::testing::AssertionResult string_checkSplit() {
		RecordProperty("description","check the how CString handle string splitting");
		RecordProperty("description","check how CString handle string splitting");
		IRA::CString base("That is a test string that must be split");		
		IRA::CString token("is");
		IRA::CString split1,split2;		
@@ -44,6 +44,27 @@ public:
		return ::testing::AssertionSuccess();
	}
	
	::testing::AssertionResult string_Find() {
		RecordProperty("description","check the bug emerged");
		IRA::CString search("KKC QQC CCC MMC");		
		IRA::CString failToken("XXP");
		IRA::CString successToken("QQC");
		IRA::CString bugToken("KKC");
		int pos=search.Find(failToken);
		if (pos>0) {
			return ::testing::AssertionFailure() << "result should be negative as the string is not present";
		}
		pos=search.Find(successToken);
		if (pos<=0) {
			return ::testing::AssertionFailure() << "result should be positive as the string is present";
		}
		pos=search.Find(bugToken);
		if (pos!=0) {
			return ::testing::AssertionFailure() << "result should be zero as the string start with first char";
		}
		return ::testing::AssertionSuccess();
	}

protected:
	virtual void SetUp() {
	}
+4 −0
Original line number Diff line number Diff line
@@ -86,6 +86,10 @@ TEST_F(IRALibrary_String,string_checkSplit) {
	EXPECT_TRUE(string_checkSplit());
}

TEST_F(IRALibrary_String,string_Find) {
	EXPECT_TRUE(string_Find());
}

TEST_F(IRALibrary_BaseConverter,decToBin_checkConversion) {
	EXPECT_TRUE(decToBin_checkConversion());
}
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
#include "Tone.h"

#define IS_LO_AVAIL m_configuration.getLocalOscillatorInstance()!=""
#define IS_LO_TUNABLE m_configuration.getLocalOscillatorEnabledReceivers().Find(m_setup)>0 
#define IS_LO_TUNABLE m_configuration.getLocalOscillatorEnabledReceivers().Find(m_setup)>=0 

//_IRA_LOGFILTER_IMPORT;