From 8795d3cfc9f3810fb781dcda49c522a905548120 Mon Sep 17 00:00:00 2001 From: jrand Date: Thu, 8 Aug 2002 04:31:43 +0000 Subject: [PATCH] Add some asserts for checking the simple methods from the archivable interface inherited by BPropertyInfo. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@647 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../PropertyConstructionTest1.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/tests/kits/app/bpropertyinfo/PropertyConstructionTest1.cpp b/src/tests/kits/app/bpropertyinfo/PropertyConstructionTest1.cpp index 1b4386e55a..98c0193270 100644 --- a/src/tests/kits/app/bpropertyinfo/PropertyConstructionTest1.cpp +++ b/src/tests/kits/app/bpropertyinfo/PropertyConstructionTest1.cpp @@ -1,5 +1,5 @@ /* - $Id: PropertyConstructionTest1.cpp,v 1.1 2002/08/07 05:12:53 jrand Exp $ + $Id: PropertyConstructionTest1.cpp,v 1.2 2002/08/08 04:31:43 jrand Exp $ This file implements the first test for the OpenBeOS BPropertyInfo code. It tests the Construction use cases. It does so by doing the following: @@ -11,6 +11,7 @@ #include #include #include +#include /* @@ -85,6 +86,10 @@ assert(propTest->Values() == NULL); assert(propTest->CountProperties() == 0); assert(propTest->CountValues() == 0); + assert(!propTest->IsFixedSize()); + assert(propTest->TypeCode() == B_PROPERTY_INFO_TYPE); + assert(propTest->AllowsTypeCode(B_PROPERTY_INFO_TYPE)); + assert(!propTest->AllowsTypeCode(B_TIME_TYPE)); delete propTest; int i, j; @@ -95,6 +100,10 @@ assert(propTest->Values() == NULL); assert(propTest->CountProperties() == prop_counts[i]); assert(propTest->CountValues() == 0); + assert(!propTest->IsFixedSize()); + assert(propTest->TypeCode() == B_PROPERTY_INFO_TYPE); + assert(propTest->AllowsTypeCode(B_PROPERTY_INFO_TYPE)); + assert(!propTest->AllowsTypeCode(B_TIME_TYPE)); delete propTest; for (j=0; j < sizeof(value_counts) / sizeof(int); j++) { @@ -103,6 +112,10 @@ assert(propTest->Values() == value_lists[j]); assert(propTest->CountProperties() == prop_counts[i]); assert(propTest->CountValues() == value_counts[j]); + assert(!propTest->IsFixedSize()); + assert(propTest->TypeCode() == B_PROPERTY_INFO_TYPE); + assert(propTest->AllowsTypeCode(B_PROPERTY_INFO_TYPE)); + assert(!propTest->AllowsTypeCode(B_TIME_TYPE)); delete propTest; propTest = new BPropertyInfo(prop_lists[i], value_lists[j], false); @@ -110,6 +123,10 @@ assert(propTest->Values() == value_lists[j]); assert(propTest->CountProperties() == prop_counts[i]); assert(propTest->CountValues() == value_counts[j]); + assert(!propTest->IsFixedSize()); + assert(propTest->TypeCode() == B_PROPERTY_INFO_TYPE); + assert(propTest->AllowsTypeCode(B_PROPERTY_INFO_TYPE)); + assert(!propTest->AllowsTypeCode(B_TIME_TYPE)); delete propTest; } }