basic: fix loplugin:cppunitassertequals warnings
Change-Id: I80c773f3127ebbce4b9b2a122a91a2e2ca4f505b Reviewed-on: https://gerrit.libreoffice.org/27424 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -53,7 +53,7 @@ void EnableTest::testEnableRuntime()
|
|||||||
myMacro.Compile();
|
myMacro.Compile();
|
||||||
CPPUNIT_ASSERT_MESSAGE("testEnableRuntime fails with compile error",!myMacro.HasError() );
|
CPPUNIT_ASSERT_MESSAGE("testEnableRuntime fails with compile error",!myMacro.HasError() );
|
||||||
SbxVariableRef pNew = myMacro.Run();
|
SbxVariableRef pNew = myMacro.Run();
|
||||||
CPPUNIT_ASSERT(pNew->GetInteger() == 3 );
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(3), pNew->GetInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnableTest::testDimEnable()
|
void EnableTest::testDimEnable()
|
||||||
|
@@ -173,7 +173,7 @@ void Nested_Struct::testAssign1()
|
|||||||
myMacro.Compile();
|
myMacro.Compile();
|
||||||
CPPUNIT_ASSERT_MESSAGE("testAssign1 fails with compile error",!myMacro.HasError() );
|
CPPUNIT_ASSERT_MESSAGE("testAssign1 fails with compile error",!myMacro.HasError() );
|
||||||
SbxVariableRef pNew = myMacro.Run();
|
SbxVariableRef pNew = myMacro.Run();
|
||||||
CPPUNIT_ASSERT(pNew->GetInteger() == 9 );
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(9), pNew->GetInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nested_Struct::testAssign1Alt()
|
void Nested_Struct::testAssign1Alt()
|
||||||
@@ -196,7 +196,7 @@ void Nested_Struct::testOldAssign()
|
|||||||
myMacro.Compile();
|
myMacro.Compile();
|
||||||
CPPUNIT_ASSERT_MESSAGE("testOldAssign fails with compile error",!myMacro.HasError() );
|
CPPUNIT_ASSERT_MESSAGE("testOldAssign fails with compile error",!myMacro.HasError() );
|
||||||
SbxVariableRef pNew = myMacro.Run();
|
SbxVariableRef pNew = myMacro.Run();
|
||||||
CPPUNIT_ASSERT(pNew->GetInteger() == 9 );
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(9), pNew->GetInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nested_Struct::testOldAssignAlt()
|
void Nested_Struct::testOldAssignAlt()
|
||||||
@@ -220,7 +220,7 @@ void Nested_Struct::testUnfixedVarAssign()
|
|||||||
CPPUNIT_ASSERT_MESSAGE("testUnfixedVarAssign fails with compile error",!myMacro.HasError() );
|
CPPUNIT_ASSERT_MESSAGE("testUnfixedVarAssign fails with compile error",!myMacro.HasError() );
|
||||||
// forces a broadcast
|
// forces a broadcast
|
||||||
SbxVariableRef pNew = myMacro.Run();
|
SbxVariableRef pNew = myMacro.Run();
|
||||||
CPPUNIT_ASSERT(pNew->GetInteger() == 13 );
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(13), pNew->GetInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nested_Struct::testUnfixedVarAssignAlt()
|
void Nested_Struct::testUnfixedVarAssignAlt()
|
||||||
@@ -256,7 +256,7 @@ void Nested_Struct::testFixedVarAssign()
|
|||||||
myMacro.Compile();
|
myMacro.Compile();
|
||||||
CPPUNIT_ASSERT_MESSAGE("testFixedVarAssign fails with compile error",!myMacro.HasError() );
|
CPPUNIT_ASSERT_MESSAGE("testFixedVarAssign fails with compile error",!myMacro.HasError() );
|
||||||
SbxVariableRef pNew = myMacro.Run();
|
SbxVariableRef pNew = myMacro.Run();
|
||||||
CPPUNIT_ASSERT(pNew->GetInteger() == 13 );
|
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(13), pNew->GetInteger());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Nested_Struct::testFixedVarAssignAlt()
|
void Nested_Struct::testFixedVarAssignAlt()
|
||||||
|
@@ -81,7 +81,7 @@ void VBATest::testMiscVBAFunctions()
|
|||||||
fprintf(stderr, "macro returned:\n%s\n", OUStringToOString( pReturn->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() );
|
fprintf(stderr, "macro returned:\n%s\n", OUStringToOString( pReturn->GetOUString(), RTL_TEXTENCODING_UTF8 ).getStr() );
|
||||||
}
|
}
|
||||||
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn != nullptr );
|
CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn != nullptr );
|
||||||
CPPUNIT_ASSERT_MESSAGE("Result not as expected", pReturn->GetOUString() == "OK" );
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"), pReturn->GetOUString() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user