From 7df435325b5a4b8b34d61db42094554279e6bd62 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 16 Mar 2020 10:53:22 +0100 Subject: Fix implicit cast from bool to int in path tests --- tests/gtests/blenlib/BLI_path_util_test.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/gtests') diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc index 2b47995095a..401ba2d5ffb 100644 --- a/tests/gtests/blenlib/BLI_path_util_test.cc +++ b/tests/gtests/blenlib/BLI_path_util_test.cc @@ -123,10 +123,10 @@ TEST(path_util, Clean) int index_output, len_output; \ const bool ret = BLI_path_name_at_index(path, index_input, &index_output, &len_output); \ if (expect == NULL) { \ - EXPECT_EQ(ret, false); \ + EXPECT_FALSE(ret); \ } \ else { \ - EXPECT_EQ(ret, true); \ + EXPECT_TRUE(ret); \ EXPECT_EQ(strlen(expect), len_output); \ path[index_output + len_output] = '\0'; \ EXPECT_STREQ(&path[index_output], expect); \ @@ -355,42 +355,42 @@ TEST(path_util, Frame) { char path[FILE_MAX] = ""; ret = BLI_path_frame(path, 123, 1); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("123", path); } { char path[FILE_MAX] = ""; ret = BLI_path_frame(path, 123, 12); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("000000000123", path); } { char path[FILE_MAX] = "test_"; ret = BLI_path_frame(path, 123, 1); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("test_123", path); } { char path[FILE_MAX] = "test_"; ret = BLI_path_frame(path, 1, 12); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("test_000000000001", path); } { char path[FILE_MAX] = "test_############"; ret = BLI_path_frame(path, 1, 0); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("test_000000000001", path); } { char path[FILE_MAX] = "test_#_#_middle"; ret = BLI_path_frame(path, 123, 0); - EXPECT_EQ(ret, 1); + EXPECT_TRUE(ret); EXPECT_STREQ("test_#_123_middle", path); } @@ -398,14 +398,14 @@ TEST(path_util, Frame) { char path[FILE_MAX] = ""; ret = BLI_path_frame(path, 123, 0); - EXPECT_EQ(ret, 0); + EXPECT_FALSE(ret); EXPECT_STREQ("", path); } { char path[FILE_MAX] = "test_middle"; ret = BLI_path_frame(path, 123, 0); - EXPECT_EQ(ret, 0); + EXPECT_FALSE(ret); EXPECT_STREQ("test_middle", path); } } -- cgit v1.2.3