https://svn.lrde.epita.fr/svn/oln/trunk/static
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Catch up with changes in Metalic.
* stc/properties.hh (stc_equip_namespace_with_properties): Use
mlc_bool to extract the value of mlc::abstract::bexpr's.
* stc/properties.hh: Update test (use mlc::assert_).
stc/properties.hh | 4 ++--
tests/properties.cc | 20 ++++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
Index: tests/properties.cc
--- tests/properties.cc (revision 429)
+++ tests/properties.cc (working copy)
@@ -1,6 +1,6 @@
#include <stc/properties.hh>
#include <mlc/cmp.hh>
-
+#include <mlc/assert.hh>
// FIXME: Split this test into several smaller tests? For instance,
// we have to test inheritance, properties/associated types,
@@ -149,17 +149,17 @@
main()
{
// Check types associated to A.
- mlc_eq(my::A::foo_type, int)::ensure ();
- mlc_eq(my::A::bar_type, float)::ensure ();
+ mlc::assert_<mlc_eq(my::A::foo_type, int)>::check();
+ mlc::assert_<mlc_eq(my::A::bar_type, float)>::check();
// Check types associated to B.
- mlc_neq(my::B::bar_type, my::A::bar_type)::ensure ();
- mlc_eq(my::B::baz_type, char)::ensure ();
- mlc_eq(my::B::quux_type, long)::ensure ();
- mlc_eq(my::B::yin_type, unsigned long)::ensure ();
+ mlc::assert_<mlc_neq(my::B::bar_type, my::A::bar_type)>::check();
+ mlc::assert_<mlc_eq(my::B::baz_type, char)>::check();
+ mlc::assert_<mlc_eq(my::B::quux_type, long)>::check();
+ mlc::assert_<mlc_eq(my::B::yin_type, unsigned long)>::check();
// Check types associated to C.
- mlc_eq(my::C::foo_type, int)::ensure ();
- mlc_eq(my::C::quux_type, long)::ensure ();
- mlc_eq(my::C::zorg_type, double)::ensure ();
+ mlc::assert_<mlc_eq(my::C::foo_type, int)>::check();
+ mlc::assert_<mlc_eq(my::C::quux_type, long)>::check();
+ mlc::assert_<mlc_eq(my::C::zorg_type, double)>::check();
}
Index: stc/properties.hh
--- stc/properties.hh (revision 429)
+++ stc/properties.hh (working copy)
@@ -333,9 +333,9 @@
\
/* Did we found the virtual type? */ \
static const bool found_external_p = \
- mlc::is_found<external_typedef>::value; \
+ mlc_bool(mlc::is_found<external_typedef>); \
static const bool found_internal_p = \
- mlc::is_found<internal_typedef>::value; \
+ mlc_bool(mlc::is_found<internal_typedef>); \
\
typedef typename \
internal::select_typedef<found_external_p, found_internal_p, \