lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [03/11] git commit: refs/heads/master - Transition Clownfish TestHarness to _IMP.
Date Mon, 12 Aug 2013 20:51:41 GMT
Transition Clownfish TestHarness to _IMP.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/485b4b2e
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/485b4b2e
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/485b4b2e

Branch: refs/heads/master
Commit: 485b4b2eb549fdbaa33fac22cc63d45b33ab6301
Parents: a329bd5
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Thu Aug 8 15:13:22 2013 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Mon Aug 12 13:40:47 2013 -0700

----------------------------------------------------------------------
 .../Clownfish/TestHarness/TestBatchRunner.c     | 52 ++++++++++----------
 .../core/Clownfish/TestHarness/TestFormatter.c  | 38 +++++++-------
 .../core/Clownfish/TestHarness/TestSuite.c      |  8 +--
 .../Clownfish/TestHarness/TestSuiteRunner.c     | 14 +++---
 4 files changed, 56 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/485b4b2e/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c b/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
index a2e7a5c..bccf6fc 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestBatchRunner.c
@@ -64,13 +64,13 @@ TestBatchRunner_init(TestBatchRunner *self, TestFormatter *formatter)
{
 }
 
 void
-TestBatchRunner_destroy(TestBatchRunner *self) {
+TestBatchRunner_Destroy_IMP(TestBatchRunner *self) {
     DECREF(self->formatter);
     SUPER_DESTROY(self, TESTBATCHRUNNER);
 }
 
 bool
-TestBatchRunner_run_batch(TestBatchRunner *self, TestBatch *batch) {
+TestBatchRunner_Run_Batch_IMP(TestBatchRunner *self, TestBatch *batch) {
     struct try_run_tests_context args;
     args.runner = self;
     args.batch  = batch;
@@ -107,24 +107,24 @@ S_try_run_tests(void *context) {
 }
 
 void
-TestBatchRunner_plan(TestBatchRunner *self, TestBatch *batch,
-                     uint32_t num_planned) {
+TestBatchRunner_Plan_IMP(TestBatchRunner *self, TestBatch *batch,
+                         uint32_t num_planned) {
     self->num_planned = num_planned;
     TestFormatter_Batch_Prologue(self->formatter, batch, num_planned);
 }
 
 uint32_t
-TestBatchRunner_get_num_planned(TestBatchRunner *self) {
+TestBatchRunner_Get_Num_Planned_IMP(TestBatchRunner *self) {
     return self->num_planned;
 }
 
 uint32_t
-TestBatchRunner_get_num_tests(TestBatchRunner *self) {
+TestBatchRunner_Get_Num_Tests_IMP(TestBatchRunner *self) {
     return self->test_num;
 }
 
 uint32_t
-TestBatchRunner_get_num_failed(TestBatchRunner *self) {
+TestBatchRunner_Get_Num_Failed_IMP(TestBatchRunner *self) {
     return self->num_failed;
 }
 
@@ -209,21 +209,21 @@ TestBatchRunner_skip(TestBatchRunner *self, const char *pattern, ...)
{
 }
 
 bool
-TestBatchRunner_vtest_true(TestBatchRunner *self, bool condition,
-                           const char *pattern, va_list args) {
+TestBatchRunner_VTest_True_IMP(TestBatchRunner *self, bool condition,
+                               const char *pattern, va_list args) {
     return S_vtest_true(self, condition, pattern, args);
 }
 
 bool
-TestBatchRunner_vtest_false(TestBatchRunner *self, bool condition,
-                            const char *pattern, va_list args) {
+TestBatchRunner_VTest_False_IMP(TestBatchRunner *self, bool condition,
+                                const char *pattern, va_list args) {
     return S_vtest_true(self, !condition, pattern, args);
 }
 
 bool
-TestBatchRunner_vtest_int_equals(TestBatchRunner *self, long got,
-                                 long expected, const char *pattern,
-                                 va_list args) {
+TestBatchRunner_VTest_Int_Equals_IMP(TestBatchRunner *self, long got,
+                                     long expected, const char *pattern,
+                                     va_list args) {
     bool pass = (got == expected);
     S_vtest_true(self, pass, pattern, args);
     if (!pass) {
@@ -235,9 +235,9 @@ TestBatchRunner_vtest_int_equals(TestBatchRunner *self, long got,
 }
 
 bool
-TestBatchRunner_vtest_float_equals(TestBatchRunner *self, double got,
-                                   double expected, const char *pattern,
-                                   va_list args) {
+TestBatchRunner_VTest_Float_Equals_IMP(TestBatchRunner *self, double got,
+                                       double expected, const char *pattern,
+                                       va_list args) {
     double relative_error = got / expected - 1.0;
     bool   pass           = (fabs(relative_error) < 1e-6);
     S_vtest_true(self, pass, pattern, args);
@@ -250,9 +250,9 @@ TestBatchRunner_vtest_float_equals(TestBatchRunner *self, double got,
 }
 
 bool
-TestBatchRunner_vtest_string_equals(TestBatchRunner *self, const char *got,
-                                    const char *expected, const char *pattern,
-                                    va_list args) {
+TestBatchRunner_VTest_String_Equals_IMP(TestBatchRunner *self, const char *got,
+                                        const char *expected,
+                                        const char *pattern, va_list args) {
     bool pass = (strcmp(got, expected) == 0);
     S_vtest_true(self, pass, pattern, args);
     if (!pass) {
@@ -264,20 +264,20 @@ TestBatchRunner_vtest_string_equals(TestBatchRunner *self, const char
*got,
 }
 
 bool
-TestBatchRunner_vpass(TestBatchRunner *self, const char *pattern,
-                      va_list args) {
+TestBatchRunner_VPass_IMP(TestBatchRunner *self, const char *pattern,
+                          va_list args) {
     return S_vtest_true(self, true, pattern, args);
 }
 
 bool
-TestBatchRunner_vfail(TestBatchRunner *self, const char *pattern,
-                      va_list args) {
+TestBatchRunner_VFail_IMP(TestBatchRunner *self, const char *pattern,
+                          va_list args) {
     return S_vtest_true(self, false, pattern, args);
 }
 
 void
-TestBatchRunner_vskip(TestBatchRunner *self, const char *pattern,
-                      va_list args) {
+TestBatchRunner_VSkip_IMP(TestBatchRunner *self, const char *pattern,
+                          va_list args) {
     self->test_num++;
     // TODO: Add a VTest_Skip method to TestFormatter
     TestFormatter_VTest_Result(self->formatter, true, self->test_num,

http://git-wip-us.apache.org/repos/asf/lucy/blob/485b4b2e/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c b/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
index c6c6d96..872b783 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestFormatter.c
@@ -74,17 +74,17 @@ TestFormatterCF_init(TestFormatterCF *self) {
 }
 
 void
-TestFormatterCF_batch_prologue(TestFormatterCF *self, TestBatch *batch,
-                               uint32_t num_planned) {
+TestFormatterCF_Batch_Prologue_IMP(TestFormatterCF *self, TestBatch *batch,
+                                   uint32_t num_planned) {
     UNUSED_VAR(self);
     CharBuf *class_name = TestBatch_Get_Class_Name(batch);
     printf("Running %s...\n", CB_Get_Ptr8(class_name));
 }
 
 void
-TestFormatterCF_vtest_result(TestFormatterCF *self, bool pass,
-                             uint32_t test_num, const char *fmt,
-                             va_list args) {
+TestFormatterCF_VTest_Result_IMP(TestFormatterCF *self, bool pass,
+                                 uint32_t test_num, const char *fmt,
+                                 va_list args) {
     UNUSED_VAR(self);
     if (!pass) {
         printf("  Failed test %u: ", test_num);
@@ -94,23 +94,23 @@ TestFormatterCF_vtest_result(TestFormatterCF *self, bool pass,
 }
 
 void
-TestFormatterCF_vtest_comment(TestFormatterCF *self, const char *fmt,
-                              va_list args) {
+TestFormatterCF_VTest_Comment_IMP(TestFormatterCF *self, const char *fmt,
+                                  va_list args) {
     UNUSED_VAR(self);
     printf("    ");
     vprintf(fmt, args);
 }
 
 void
-TestFormatterCF_vbatch_comment(TestFormatterCF *self, const char *fmt,
-                               va_list args) {
+TestFormatterCF_VBatch_Comment_IMP(TestFormatterCF *self, const char *fmt,
+                                   va_list args) {
     UNUSED_VAR(self);
     printf("  ");
     vprintf(fmt, args);
 }
 
 void
-TestFormatterCF_summary(TestFormatterCF *self, TestSuiteRunner *runner) {
+TestFormatterCF_Summary_IMP(TestFormatterCF *self, TestSuiteRunner *runner) {
     UNUSED_VAR(self);
     uint32_t num_batches = TestSuiteRunner_Get_Num_Batches(runner);
     uint32_t num_batches_failed
@@ -146,16 +146,16 @@ TestFormatterTAP_init(TestFormatterTAP *self) {
 }
 
 void
-TestFormatterTAP_batch_prologue(TestFormatterTAP *self, TestBatch *batch,
+TestFormatterTAP_Batch_Prologue_IMP(TestFormatterTAP *self, TestBatch *batch,
                                 uint32_t num_planned) {
     UNUSED_VAR(self);
     printf("1..%u\n", num_planned);
 }
 
 void
-TestFormatterTAP_vtest_result(TestFormatterTAP *self, bool pass,
-                              uint32_t test_num, const char *fmt,
-                              va_list args) {
+TestFormatterTAP_VTest_Result_IMP(TestFormatterTAP *self, bool pass,
+                                  uint32_t test_num, const char *fmt,
+                                  va_list args) {
     UNUSED_VAR(self);
     const char *result = pass ? "ok" : "not ok";
     printf("%s %u - ", result, test_num);
@@ -164,23 +164,23 @@ TestFormatterTAP_vtest_result(TestFormatterTAP *self, bool pass,
 }
 
 void
-TestFormatterTAP_vtest_comment(TestFormatterTAP *self, const char *fmt,
-                               va_list args) {
+TestFormatterTAP_VTest_Comment_IMP(TestFormatterTAP *self, const char *fmt,
+                                   va_list args) {
     UNUSED_VAR(self);
     printf("#   ");
     vprintf(fmt, args);
 }
 
 void
-TestFormatterTAP_vbatch_comment(TestFormatterTAP *self, const char *fmt,
-                                va_list args) {
+TestFormatterTAP_VBatch_Comment_IMP(TestFormatterTAP *self, const char *fmt,
+                                    va_list args) {
     UNUSED_VAR(self);
     printf("# ");
     vprintf(fmt, args);
 }
 
 void
-TestFormatterTAP_summary(TestFormatterTAP *self, TestSuiteRunner *runner) {
+TestFormatterTAP_Summary_IMP(TestFormatterTAP *self, TestSuiteRunner *runner) {
     UNUSED_VAR(self);
     UNUSED_VAR(runner);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/485b4b2e/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
index d08db22..4c8b132 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestSuite.c
@@ -50,18 +50,18 @@ TestSuite_init(TestSuite *self) {
 }
 
 void
-TestSuite_destroy(TestSuite *self) {
+TestSuite_Destroy_IMP(TestSuite *self) {
     DECREF(self->batches);
     SUPER_DESTROY(self, TESTSUITE);
 }
 
 void
-TestSuite_add_batch(TestSuite *self, TestBatch *batch) {
+TestSuite_Add_Batch_IMP(TestSuite *self, TestBatch *batch) {
     VA_Push(self->batches, (Obj*)batch);
 }
 
 bool
-TestSuite_run_batch(TestSuite *self, CharBuf *class_name,
+TestSuite_Run_Batch_IMP(TestSuite *self, CharBuf *class_name,
                     TestFormatter *formatter) {
     S_unbuffer_stdout();
 
@@ -83,7 +83,7 @@ TestSuite_run_batch(TestSuite *self, CharBuf *class_name,
 }
 
 bool
-TestSuite_run_all_batches(TestSuite *self, TestFormatter *formatter) {
+TestSuite_Run_All_Batches_IMP(TestSuite *self, TestFormatter *formatter) {
     S_unbuffer_stdout();
 
     TestSuiteRunner *runner = TestSuiteRunner_new(formatter);

http://git-wip-us.apache.org/repos/asf/lucy/blob/485b4b2e/clownfish/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c b/clownfish/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
index 5949fb6..64be5bd 100644
--- a/clownfish/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
+++ b/clownfish/runtime/core/Clownfish/TestHarness/TestSuiteRunner.c
@@ -44,13 +44,13 @@ TestSuiteRunner_init(TestSuiteRunner *self, TestFormatter *formatter)
{
 }
 
 void
-TestSuiteRunner_destroy(TestSuiteRunner *self) {
+TestSuiteRunner_Destroy_IMP(TestSuiteRunner *self) {
     DECREF(self->formatter);
     SUPER_DESTROY(self, TESTSUITERUNNER);
 }
 
 bool
-TestSuiteRunner_run_batch(TestSuiteRunner *self, TestBatch *batch) {
+TestSuiteRunner_Run_Batch_IMP(TestSuiteRunner *self, TestBatch *batch) {
     TestBatchRunner *batch_runner = TestBatchRunner_new(self->formatter);
     bool success = TestBatchRunner_Run_Batch(batch_runner, batch);
 
@@ -67,29 +67,29 @@ TestSuiteRunner_run_batch(TestSuiteRunner *self, TestBatch *batch) {
 }
 
 bool
-TestSuiteRunner_finish(TestSuiteRunner *self) {
+TestSuiteRunner_Finish_IMP(TestSuiteRunner *self) {
     TestFormatter_Summary(self->formatter, self);
 
     return self->num_batches != 0 && self->num_batches_failed == 0;
 }
 
 uint32_t
-TestSuiteRunner_get_num_tests(TestSuiteRunner *self) {
+TestSuiteRunner_Get_Num_Tests_IMP(TestSuiteRunner *self) {
     return self->num_tests;
 }
 
 uint32_t
-TestSuiteRunner_get_num_tests_failed(TestSuiteRunner *self) {
+TestSuiteRunner_Get_Num_Tests_Failed_IMP(TestSuiteRunner *self) {
     return self->num_tests_failed;
 }
 
 uint32_t
-TestSuiteRunner_get_num_batches(TestSuiteRunner *self) {
+TestSuiteRunner_Get_Num_Batches_IMP(TestSuiteRunner *self) {
     return self->num_batches;
 }
 
 uint32_t
-TestSuiteRunner_get_num_batches_failed(TestSuiteRunner *self) {
+TestSuiteRunner_Get_Num_Batches_Failed_IMP(TestSuiteRunner *self) {
     return self->num_batches_failed;
 }
 


Mime
View raw message