Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-10-10 10:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-10 14:04:51 +0300
commit2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch)
treee7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/io/alembic/tests
parentc735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff)
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/io/alembic/tests')
-rw-r--r--source/blender/io/alembic/tests/abc_export_test.cc20
-rw-r--r--source/blender/io/alembic/tests/abc_matrix_test.cc44
2 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/io/alembic/tests/abc_export_test.cc b/source/blender/io/alembic/tests/abc_export_test.cc
index 625dbfd176f..e1a9bd34f6b 100644
--- a/source/blender/io/alembic/tests/abc_export_test.cc
+++ b/source/blender/io/alembic/tests/abc_export_test.cc
@@ -1,6 +1,6 @@
#include "testing/testing.h"
-// Keep first since utildefines defines AT which conflicts with STL
+/* Keep first since utildefines defines AT which conflicts with STL */
#include "exporter/abc_archive.h"
#include "intern/abc_util.h"
@@ -49,7 +49,7 @@ class AlembicExportTest : public testing::Test {
deleteArchive();
}
- // Call after setting up the parameters.
+ /* Call after setting up the parameters. */
void createArchive()
{
if (abc_archive != nullptr) {
@@ -108,28 +108,28 @@ TEST_F(AlembicExportTest, TimeSamplesFullShutterDifferent)
createArchive();
std::vector<double> frames(abc_archive->frames_begin(), abc_archive->frames_end());
EXPECT_EQ(8, frames.size());
- EXPECT_NEAR(31.0, frames[0], 1e-5); // transform + shape
+ EXPECT_NEAR(31.0, frames[0], 1e-5); /* transform + shape */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[0]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[0]));
- EXPECT_NEAR(31.33333, frames[1], 1e-5); // transform
+ EXPECT_NEAR(31.33333, frames[1], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[1]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[1]));
- EXPECT_NEAR(31.5, frames[2], 1e-5); // shape
+ EXPECT_NEAR(31.5, frames[2], 1e-5); /* shape */
EXPECT_FALSE(abc_archive->is_xform_frame(frames[2]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[2]));
- EXPECT_NEAR(31.66666, frames[3], 1e-5); // transform
+ EXPECT_NEAR(31.66666, frames[3], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[3]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[3]));
- EXPECT_NEAR(32.0, frames[4], 1e-5); // transform + shape
+ EXPECT_NEAR(32.0, frames[4], 1e-5); /* transform + shape */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[4]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[4]));
- EXPECT_NEAR(32.33333, frames[5], 1e-5); // transform
+ EXPECT_NEAR(32.33333, frames[5], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[5]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[5]));
- EXPECT_NEAR(32.5, frames[6], 1e-5); // shape
+ EXPECT_NEAR(32.5, frames[6], 1e-5); /* shape */
EXPECT_FALSE(abc_archive->is_xform_frame(frames[6]));
EXPECT_TRUE(abc_archive->is_shape_frame(frames[6]));
- EXPECT_NEAR(32.66666, frames[7], 1e-5); // transform
+ EXPECT_NEAR(32.66666, frames[7], 1e-5); /* transform */
EXPECT_TRUE(abc_archive->is_xform_frame(frames[7]));
EXPECT_FALSE(abc_archive->is_shape_frame(frames[7]));
}
diff --git a/source/blender/io/alembic/tests/abc_matrix_test.cc b/source/blender/io/alembic/tests/abc_matrix_test.cc
index 02ef1a99348..fc5b645987e 100644
--- a/source/blender/io/alembic/tests/abc_matrix_test.cc
+++ b/source/blender/io/alembic/tests/abc_matrix_test.cc
@@ -10,15 +10,15 @@ namespace blender::io::alembic {
TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
float euler[3] = {0.f, M_PI_4, 0.f};
- // Construct expected matrices
+ /* Construct expected matrices */
float unit[3][3];
- float rot_z_min_quart_pi[3][3]; // rotation of -pi/4 radians over z-axis
+ float rot_z_min_quart_pi[3][3]; /* rotation of -pi/4 radians over z-axis */
unit_m3(unit);
unit_m3(rot_z_min_quart_pi);
@@ -27,7 +27,7 @@ TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
rot_z_min_quart_pi[1][0] = M_SQRT1_2;
rot_z_min_quart_pi[1][1] = M_SQRT1_2;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, unit, 1e-5f);
@@ -37,15 +37,15 @@ TEST(abc_matrix, CreateRotationMatrixY_YfromZ)
TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
float euler[3] = {0.f, 0.f, M_PI_4};
- // Construct expected matrices
+ /* Construct expected matrices */
float unit[3][3];
- float rot_y_quart_pi[3][3]; // rotation of pi/4 radians over y-axis
+ float rot_y_quart_pi[3][3]; /* rotation of pi/4 radians over y-axis */
unit_m3(unit);
unit_m3(rot_y_quart_pi);
@@ -54,7 +54,7 @@ TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
rot_y_quart_pi[2][0] = M_SQRT1_2;
rot_y_quart_pi[2][2] = M_SQRT1_2;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, unit, 1e-5f);
@@ -64,17 +64,17 @@ TEST(abc_matrix, CreateRotationMatrixZ_YfromZ)
TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- // in degrees: X=10, Y=20, Z=30
+ /* in degrees: X=10, Y=20, Z=30 */
float euler[3] = {0.17453292012214f, 0.34906581044197f, 0.52359879016876f};
- // Construct expected matrices
- float rot_x_p10[3][3]; // rotation of +10 degrees over x-axis
- float rot_y_p30[3][3]; // rotation of +30 degrees over y-axis
- float rot_z_m20[3][3]; // rotation of -20 degrees over z-axis
+ /* Construct expected matrices */
+ float rot_x_p10[3][3]; /* rotation of +10 degrees over x-axis */
+ float rot_y_p30[3][3]; /* rotation of +30 degrees over y-axis */
+ float rot_z_m20[3][3]; /* rotation of -20 degrees over z-axis */
unit_m3(rot_x_p10);
rot_x_p10[1][1] = 0.9848077297210693f;
@@ -94,7 +94,7 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
rot_z_m20[1][0] = 0.3420201241970062f;
rot_z_m20[1][1] = 0.9396926164627075f;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_YUP_FROM_ZUP);
EXPECT_M3_NEAR(rot_x_mat, rot_x_p10, 1e-5f);
@@ -104,17 +104,17 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_YfromZ)
TEST(abc_matrix, CreateRotationMatrixXYZ_ZfromY)
{
- // Input variables
+ /* Input variables */
float rot_x_mat[3][3];
float rot_y_mat[3][3];
float rot_z_mat[3][3];
- // in degrees: X=10, Y=20, Z=30
+ /* in degrees: X=10, Y=20, Z=30 */
float euler[3] = {0.1745329201221466f, 0.3490658104419708f, 0.5235987901687622f};
- // Construct expected matrices
- float rot_x_p10[3][3]; // rotation of +10 degrees over x-axis
- float rot_y_m30[3][3]; // rotation of -30 degrees over y-axis
- float rot_z_p20[3][3]; // rotation of +20 degrees over z-axis
+ /* Construct expected matrices */
+ float rot_x_p10[3][3]; /* rotation of +10 degrees over x-axis */
+ float rot_y_m30[3][3]; /* rotation of -30 degrees over y-axis */
+ float rot_z_p20[3][3]; /* rotation of +20 degrees over z-axis */
unit_m3(rot_x_p10);
rot_x_p10[1][1] = 0.9848077297210693f;
@@ -134,7 +134,7 @@ TEST(abc_matrix, CreateRotationMatrixXYZ_ZfromY)
rot_z_p20[1][0] = -0.3420201241970062f;
rot_z_p20[1][1] = 0.9396926164627075f;
- // Run tests
+ /* Run tests */
create_swapped_rotation_matrix(rot_x_mat, rot_y_mat, rot_z_mat, euler, ABC_ZUP_FROM_YUP);
EXPECT_M3_NEAR(rot_x_mat, rot_x_p10, 1e-5f);