[tests] Don't add a newline to the end of g_test_message calls
Two of the timeline tests were calling g_test_message and adding a \n so the output looked odd.
This commit is contained in:
parent
19cbb30783
commit
6bb5b3a13e
@ -57,16 +57,16 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
if (current_frame >= (state->expected_frame-TEST_ERROR_TOLERANCE)
|
||||
&& current_frame <= (state->expected_frame+TEST_ERROR_TOLERANCE))
|
||||
{
|
||||
g_test_message ("\nelapsed milliseconds=%-5li "
|
||||
"expected frame=%-4i actual frame=%-4i (OK)\n",
|
||||
g_test_message ("elapsed milliseconds=%-5li "
|
||||
"expected frame=%-4i actual frame=%-4i (OK)",
|
||||
msec_diff,
|
||||
state->expected_frame,
|
||||
current_frame);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_test_message ("\nelapsed milliseconds=%-5li "
|
||||
"expected frame=%-4i actual frame=%-4i (FAILED)\n",
|
||||
g_test_message ("elapsed milliseconds=%-5li "
|
||||
"expected frame=%-4i actual frame=%-4i (FAILED)",
|
||||
msec_diff,
|
||||
state->expected_frame,
|
||||
current_frame);
|
||||
@ -77,7 +77,7 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
{
|
||||
state->expected_frame = current_frame + (TEST_TIMELINE_FPS / 4);
|
||||
g_test_message ("Sleeping for 250ms "
|
||||
"so next frame should be (%i + %i) = %i\n",
|
||||
"so next frame should be (%i + %i) = %i",
|
||||
current_frame,
|
||||
(TEST_TIMELINE_FPS / 4),
|
||||
state->expected_frame);
|
||||
@ -87,7 +87,7 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
{
|
||||
state->expected_frame = current_frame + TEST_TIMELINE_FPS;
|
||||
g_test_message ("Sleeping for 1sec "
|
||||
"so next frame should be (%i + %i) = %i\n",
|
||||
"so next frame should be (%i + %i) = %i",
|
||||
current_frame,
|
||||
TEST_TIMELINE_FPS,
|
||||
state->expected_frame);
|
||||
@ -99,7 +99,7 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
state->expected_frame += loop_overflow;
|
||||
state->expected_frame -= TEST_TIMELINE_DURATION;
|
||||
g_test_message ("End of timeline reached: "
|
||||
"Wrapping expected frame too %i\n",
|
||||
"Wrapping expected frame too %i",
|
||||
state->expected_frame);
|
||||
}
|
||||
|
||||
|
@ -16,17 +16,17 @@ typedef struct _TestState
|
||||
static gboolean
|
||||
watchdog_timeout (TestState *state)
|
||||
{
|
||||
g_test_message ("Watchdog timer kicking in\n");
|
||||
g_test_message ("rewind_count=%i\n", state->rewind_count);
|
||||
g_test_message ("Watchdog timer kicking in");
|
||||
g_test_message ("rewind_count=%i", state->rewind_count);
|
||||
if (state->rewind_count <= 3)
|
||||
{
|
||||
/* The test has hung */
|
||||
g_test_message ("Failed (This test shouldn't have hung!)\n");
|
||||
g_test_message ("Failed (This test shouldn't have hung!)");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_test_message ("Passed\n");
|
||||
g_test_message ("Passed");
|
||||
clutter_main_quit ();
|
||||
}
|
||||
|
||||
@ -42,8 +42,8 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
|
||||
if (elapsed_time == TEST_TIMELINE_DURATION)
|
||||
{
|
||||
g_test_message ("new-frame signal recieved (end of timeline)\n");
|
||||
g_test_message ("Rewinding timeline\n");
|
||||
g_test_message ("new-frame signal received (end of timeline)");
|
||||
g_test_message ("Rewinding timeline");
|
||||
clutter_timeline_rewind (timeline);
|
||||
state->rewind_count++;
|
||||
}
|
||||
@ -51,16 +51,16 @@ new_frame_cb (ClutterTimeline *timeline,
|
||||
{
|
||||
if (elapsed_time == 0)
|
||||
{
|
||||
g_test_message ("new-frame signal recieved (start of timeline)\n");
|
||||
g_test_message ("new-frame signal received (start of timeline)");
|
||||
}
|
||||
else
|
||||
{
|
||||
g_test_message ("new-frame signal recieved (mid frame)\n");
|
||||
g_test_message ("new-frame signal received (mid frame)");
|
||||
}
|
||||
|
||||
if (state->rewind_count >= 2)
|
||||
{
|
||||
g_test_message ("Sleeping for 1 second\n");
|
||||
g_test_message ("Sleeping for 1 second");
|
||||
g_usleep (1000000);
|
||||
}
|
||||
}
|
||||
@ -79,7 +79,7 @@ test_timeline_rewind (TestConformSimpleFixture *fixture,
|
||||
G_CALLBACK(new_frame_cb),
|
||||
&state);
|
||||
g_test_message ("Installing a watchdog timeout "
|
||||
"to determine if this test hangs\n");
|
||||
"to determine if this test hangs");
|
||||
g_timeout_add (TEST_WATCHDOG_KICK_IN_SECONDS*1000,
|
||||
(GSourceFunc)watchdog_timeout,
|
||||
&state);
|
||||
|
Loading…
x
Reference in New Issue
Block a user