Cleanup: test naming

This commit is contained in:
Campbell Barton
2014-07-19 20:02:14 +10:00
parent 8ad607bbe0
commit f7d6749e2f
3 changed files with 12 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
#include "BLI_math.h" #include "BLI_math.h"
TEST(mathutils, RGBToHSVRoundtrip) TEST(math_color, RGBToHSVRoundtrip)
{ {
float orig_rgb[3] = {0.1f, 0.2f, 0.3f}; float orig_rgb[3] = {0.1f, 0.2f, 0.3f};
float hsv[3], rgb[3]; float hsv[3], rgb[3];
@@ -13,7 +13,7 @@ TEST(mathutils, RGBToHSVRoundtrip)
EXPECT_V3_NEAR(orig_rgb, rgb, 1e-5); EXPECT_V3_NEAR(orig_rgb, rgb, 1e-5);
} }
TEST(mathutils, RGBToHSLRoundtrip) TEST(math_color, RGBToHSLRoundtrip)
{ {
float orig_rgb[3] = {0.1f, 0.2f, 0.3f}; float orig_rgb[3] = {0.1f, 0.2f, 0.3f};
float hsl[3], rgb[3]; float hsl[3], rgb[3];
@@ -22,7 +22,7 @@ TEST(mathutils, RGBToHSLRoundtrip)
EXPECT_V3_NEAR(orig_rgb, rgb, 1e-5); EXPECT_V3_NEAR(orig_rgb, rgb, 1e-5);
} }
TEST(mathutils, RGBToYUVRoundtrip) TEST(math_color, RGBToYUVRoundtrip)
{ {
float orig_rgb[3] = {0.1f, 0.2f, 0.3f}; float orig_rgb[3] = {0.1f, 0.2f, 0.3f};
float yuv[3], rgb[3]; float yuv[3], rgb[3];
@@ -33,7 +33,7 @@ TEST(mathutils, RGBToYUVRoundtrip)
EXPECT_V3_NEAR(orig_rgb, rgb, 1e-4); EXPECT_V3_NEAR(orig_rgb, rgb, 1e-4);
} }
TEST(mathutils, RGBToYCCRoundtrip) TEST(math_color, RGBToYCCRoundtrip)
{ {
float orig_rgb[3] = {0.1f, 0.2f, 0.3f}; float orig_rgb[3] = {0.1f, 0.2f, 0.3f};
float ycc[3], rgb[3]; float ycc[3], rgb[3];
@@ -63,21 +63,21 @@ TEST(mathutils, RGBToYCCRoundtrip)
EXPECT_V3_NEAR(orig_rgb, rgb, 1e-3); EXPECT_V3_NEAR(orig_rgb, rgb, 1e-3);
} }
TEST(mathutils, LinearRGBTosRGBNearZero) TEST(math_color, LinearRGBTosRGBNearZero)
{ {
float linear_color = 0.002f; float linear_color = 0.002f;
float srgb_color = linearrgb_to_srgb(linear_color); float srgb_color = linearrgb_to_srgb(linear_color);
EXPECT_NEAR(0.02584f, srgb_color, 1e-5); EXPECT_NEAR(0.02584f, srgb_color, 1e-5);
} }
TEST(mathutils, LinearRGBTosRGB) TEST(math_color, LinearRGBTosRGB)
{ {
float linear_color = 0.75f; float linear_color = 0.75f;
float srgb_color = linearrgb_to_srgb(linear_color); float srgb_color = linearrgb_to_srgb(linear_color);
EXPECT_NEAR(0.880824f, srgb_color, 1e-5); EXPECT_NEAR(0.880824f, srgb_color, 1e-5);
} }
TEST(mathutils, LinearRGBTosRGBRoundtrip) TEST(math_color, LinearRGBTosRGBRoundtrip)
{ {
const int N = 50; const int N = 50;
int i; int i;

View File

@@ -4,7 +4,7 @@
#include "BLI_math.h" #include "BLI_math.h"
TEST(mathutils, DistToLine2DSimple) TEST(math_geom, DistToLine2DSimple)
{ {
float p[2] = {5.0f, 1.0f}, float p[2] = {5.0f, 1.0f},
a[2] = {0.0f, 0.0f}, a[2] = {0.0f, 0.0f},
@@ -13,7 +13,7 @@ TEST(mathutils, DistToLine2DSimple)
EXPECT_NEAR(1.0f, distance, 1e-6); EXPECT_NEAR(1.0f, distance, 1e-6);
} }
TEST(mathutils, DistToLineSegment2DSimple) TEST(math_geom, DistToLineSegment2DSimple)
{ {
float p[2] = {3.0f, 1.0f}, float p[2] = {3.0f, 1.0f},
a[2] = {0.0f, 0.0f}, a[2] = {0.0f, 0.0f},

View File

@@ -46,7 +46,7 @@ char *zLhm65070058860608_br_find_exe(const char *default_exe)
/* tests */ /* tests */
/* BLI_cleanup_path */ /* BLI_cleanup_path */
TEST(pathutils, PathUtilClean) TEST(path_util, PathUtilClean)
{ {
/* "/./" -> "/" */ /* "/./" -> "/" */
{ {
@@ -102,7 +102,7 @@ TEST(pathutils, PathUtilClean)
} }
/* BLI_path_frame */ /* BLI_path_frame */
TEST(pathutils, PathUtilFrame) TEST(path_util, PathUtilFrame)
{ {
bool ret; bool ret;
@@ -165,7 +165,7 @@ TEST(pathutils, PathUtilFrame)
} }
/* BLI_split_dirfile */ /* BLI_split_dirfile */
TEST(pathutils, PathUtilSplitDirfile) TEST(path_util, PathUtilSplitDirfile)
{ {
{ {
const char *path = ""; const char *path = "";