|
From: <tho...@us...> - 2014-05-02 10:00:33
|
Revision: 552
http://sourceforge.net/p/cgreen/code/552
Author: thomasnilsson
Date: 2014-05-02 10:00:23 +0000 (Fri, 02 May 2014)
Log Message:
-----------
Ensured that CppConstraint uses the same compare field as the inherited compare (then actually the added field does not make any sense...)
Ensured that destroy_constraint() only calls the destroy if it exists (and, yes, that will leak a few bytes sometimes, but there seems to be no destroy_cpp_constraint() yet...)
So now C++ test suite also passes
Modified Paths:
--------------
trunk/cgreen/include/cgreen/cpp_constraint.h
trunk/cgreen/src/constraint.c
Modified: trunk/cgreen/include/cgreen/cpp_constraint.h
===================================================================
--- trunk/cgreen/include/cgreen/cpp_constraint.h 2014-05-01 20:48:41 UTC (rev 551)
+++ trunk/cgreen/include/cgreen/cpp_constraint.h 2014-05-02 10:00:23 UTC (rev 552)
@@ -45,7 +45,7 @@
constraint = new CppConstraint<T>();
constraint->type = VALUE_COMPARER;
- constraint->compare = &compare_want_value;
+ constraint->Constraint::compare = &compare_want_value;
constraint->execute = &test_want;
constraint->name = "equal";
constraint->expected_value = expected_value;
Modified: trunk/cgreen/src/constraint.c
===================================================================
--- trunk/cgreen/src/constraint.c 2014-05-01 20:48:41 UTC (rev 551)
+++ trunk/cgreen/src/constraint.c 2014-05-02 10:00:23 UTC (rev 552)
@@ -90,7 +90,8 @@
}
void destroy_constraint(Constraint *constraint) {
- (*constraint->destroy)(constraint);
+ if (constraint->destroy != NULL)
+ (*constraint->destroy)(constraint);
}
void destroy_constraints(va_list constraints) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|