reformat unittests.

This commit is contained in:
Kim Kulling
2020-03-22 12:13:09 +01:00
parent edc73552cd
commit 68a9fa2df3
77 changed files with 2555 additions and 1632 deletions

View File

@@ -40,8 +40,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
#include "UnitTestPCH.h"
#include "Blender/BlenderIntermediate.h"
#include "UnitTestPCH.h"
#include <assimp/camera.h>
#include <assimp/light.h>
#include <assimp/mesh.h>
@@ -61,25 +61,20 @@ class BlenderIntermediateTest : public ::testing::Test {
// A comparator in C++ is used for ordering and must implement strict weak ordering,
// which means it must return false for equal values.
// The C++ standard defines and expects this behavior: true if lhs < rhs, false otherwise.
TEST_F( BlenderIntermediateTest,ConversionData_ObjectCompareTest ) {
TEST_F(BlenderIntermediateTest, ConversionData_ObjectCompareTest) {
Object obj1, obj2;
strncpy( obj1.id.name, NAME_1, sizeof(NAME_1) );
strncpy( obj2.id.name, NAME_2, sizeof(NAME_2) );
strncpy(obj1.id.name, NAME_1, sizeof(NAME_1));
strncpy(obj2.id.name, NAME_2, sizeof(NAME_2));
Blender::ObjectCompare cmp_true_because_first_is_smaller_than_second;
bool res( cmp_true_because_first_is_smaller_than_second( &obj1, &obj2 ) );
EXPECT_TRUE( res );
bool res(cmp_true_because_first_is_smaller_than_second(&obj1, &obj2));
EXPECT_TRUE(res);
Blender::ObjectCompare cmp_false_because_equal;
res = cmp_false_because_equal( &obj1, &obj1 );
EXPECT_FALSE( res );
res = cmp_false_because_equal(&obj1, &obj1);
EXPECT_FALSE(res);
Blender::ObjectCompare cmp_false_because_first_is_greater_than_second;
res = cmp_false_because_first_is_greater_than_second( &obj2, &obj1 );
EXPECT_FALSE( res );
res = cmp_false_because_first_is_greater_than_second(&obj2, &obj1);
EXPECT_FALSE(res);
}