|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
$Id: PropertyTestcase.cpp,v 1.1 2002/08/18 03:44:21 jrand Exp $
|
|
|
|
|
$Id: PropertyTestcase.cpp,v 1.2 2002/08/22 03:15:35 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:
|
|
|
|
@ -132,7 +132,7 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Method: PropertyTestcase::PerformTest()
|
|
|
|
|
* Descr: This member function creates 27 different BPropertyInfo
|
|
|
|
|
* Descr: This member function creates 36 different BPropertyInfo
|
|
|
|
|
* instances and then passes each of them to TestProperty().
|
|
|
|
|
* The actual instances are:
|
|
|
|
|
* - NULL property_info, NULL value_info
|
|
|
|
@ -144,11 +144,14 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
* - sample property_info, NULL value_info
|
|
|
|
|
* - sample property_info, empty value_info
|
|
|
|
|
* - sample property_info, sample value_info
|
|
|
|
|
* Each of these are created in three different ways:
|
|
|
|
|
* Each of these are created in four different ways:
|
|
|
|
|
* - one where each structure is statically allocated
|
|
|
|
|
* - one where each structure is dynamically allocated
|
|
|
|
|
* - one where the BPropertyInfo is unflattened
|
|
|
|
|
* This results in 27 different combinations to perform tests
|
|
|
|
|
* - one where the BPropertyInfo is unflattened from little
|
|
|
|
|
* endian data (generated from BeOS R5 running on Intel)
|
|
|
|
|
* - one where the BPropertyInfo is unflattened from big
|
|
|
|
|
* endian data (generated from BeOS R5 running on a BeBox)
|
|
|
|
|
* This results in 36 different combinations to perform tests
|
|
|
|
|
* on.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
@ -161,7 +164,8 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
int prop_count;
|
|
|
|
|
int value_count;
|
|
|
|
|
int flat_size;
|
|
|
|
|
char flat_data[768];
|
|
|
|
|
char lflat_data[768];
|
|
|
|
|
char bflat_data[768];
|
|
|
|
|
} property_tests;
|
|
|
|
|
|
|
|
|
|
struct property_info prop1[] = { 0 };
|
|
|
|
@ -205,12 +209,14 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0 // terminate list
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
property_tests theTests[] = {
|
|
|
|
|
static property_tests theTests[] = {
|
|
|
|
|
{ NULL, NULL, 0, 0, 9,
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0}
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0},
|
|
|
|
|
{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}
|
|
|
|
|
},
|
|
|
|
|
{ NULL, value1, 0, 0, 11,
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0}
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0},
|
|
|
|
|
{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0}
|
|
|
|
|
},
|
|
|
|
|
{ NULL, value2, 0, 2, 85,
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
|
|
@ -220,13 +226,23 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0x1, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x56, 0x61, 0x6c, 0x75,
|
|
|
|
|
0x65, 0x32, 0x0, 0x54,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0, 0x0, 0x0, 0x0},
|
|
|
|
|
{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0}
|
|
|
|
|
},
|
|
|
|
|
{ prop1, value2, 0, 2, 85,
|
|
|
|
|
{0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
|
|
@ -236,7 +252,15 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0x1, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x56, 0x61, 0x6c, 0x75,
|
|
|
|
|
0x65, 0x32, 0x0, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
|
|
|
|
|
0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x1,
|
|
|
|
|
0x0, 0x0, 0x0}
|
|
|
|
|
0x0, 0x0, 0x0},
|
|
|
|
|
{0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, 0x2, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31,
|
|
|
|
|
0x0, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68,
|
|
|
|
|
0x65, 0x20, 0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, 0x56, 0x61, 0x6c, 0x75,
|
|
|
|
|
0x65, 0x32, 0x0, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20,
|
|
|
|
|
0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x1}
|
|
|
|
|
},
|
|
|
|
|
{ prop2, NULL, 4, 0, 570,
|
|
|
|
|
{0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x74, 0x65, 0x73,
|
|
|
|
@ -286,7 +310,57 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0x0, 0x0, 0x0, 0x63, 0x74, 0x79, 0x70, 0x65, 0x33, 0x35, 0x0, 0x23,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
|
|
|
|
|
{0x1, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x74, 0x65, 0x73,
|
|
|
|
|
0x74, 0x31, 0x0, 0x74, 0x65, 0x73, 0x74, 0x31, 0x3a, 0x20, 0x54,
|
|
|
|
|
0x65, 0x73, 0x74, 0x20, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d,
|
|
|
|
|
0x20, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x69,
|
|
|
|
|
0x6e, 0x66, 0x6f, 0x0, 0x0, 0x0, 0x0, 0x0, 0x50, 0x47, 0x45,
|
|
|
|
|
0x54, 0x50, 0x53, 0x45, 0x54, 0x50, 0x45, 0x58, 0x45, 0x50, 0x44,
|
|
|
|
|
0x45, 0x4c, 0x50, 0x43, 0x52, 0x54, 0x50, 0x43, 0x4e, 0x54, 0x0,
|
|
|
|
|
0x0, 0x0, 0x7, 0x0, 0x0, 0x0, 0x8, 0x0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x32, 0x0, 0x0, 0x0, 0x0, 0x16, 0x63, 0x74,
|
|
|
|
|
0x79, 0x70, 0x65, 0x32, 0x33, 0x0, 0x0, 0x0, 0x0, 0x17, 0x63,
|
|
|
|
|
0x74, 0x79, 0x70, 0x65, 0x32, 0x34, 0x0, 0x0, 0x0, 0x0, 0x18,
|
|
|
|
|
0x63, 0x74, 0x79, 0x70, 0x65, 0x32, 0x35, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x19, 0x0, 0x0, 0x0, 0x0, 0x63, 0x74, 0x79, 0x70, 0x65, 0x33,
|
|
|
|
|
0x31, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x63, 0x74, 0x79, 0x70, 0x65,
|
|
|
|
|
0x33, 0x32, 0x0, 0x0, 0x0, 0x0, 0x20, 0x63, 0x74, 0x79, 0x70,
|
|
|
|
|
0x65, 0x33, 0x33, 0x0, 0x0, 0x0, 0x0, 0x21, 0x63, 0x74, 0x79,
|
|
|
|
|
0x70, 0x65, 0x33, 0x34, 0x0, 0x0, 0x0, 0x0, 0x22, 0x63, 0x74,
|
|
|
|
|
0x79, 0x70, 0x65, 0x33, 0x35, 0x0, 0x0, 0x0, 0x0, 0x23, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0}
|
|
|
|
|
},
|
|
|
|
|
{ prop2, value1, 4, 0, 572,
|
|
|
|
|
{0x0, 0x4, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x74, 0x65, 0x73, 0x74,
|
|
|
|
@ -336,7 +410,56 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0x63, 0x74, 0x79, 0x70, 0x65,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0, 0x5, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0,
|
|
|
|
|
0x0, 0x9, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x74, 0x65,
|
|
|
|
|
0x73, 0x74, 0x32, 0x0, 0x74, 0x65, 0x73, 0x74, 0x32, 0x3a, 0x20,
|
|
|
|
|
0x54, 0x65, 0x73, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61,
|
|
|
|
|
0x72, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x74, 0x65, 0x73, 0x74, 0x33, 0x0, 0x74, 0x65,
|
|
|
|
|
0x73, 0x74, 0x33, 0x3a, 0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x77,
|
|
|
|
|
0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x20, 0x73, 0x70, 0x65,
|
|
|
|
|
0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x0, 0x0, 0x0, 0x0, 0x2, 0x50,
|
|
|
|
|
0x47, 0x45, 0x54, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x74,
|
|
|
|
|
0x65, 0x73, 0x74, 0x34, 0x0, 0x74, 0x65, 0x73, 0x74, 0x34, 0x3a,
|
|
|
|
|
0x20, 0x54, 0x65, 0x73, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x64, 0x63,
|
|
|
|
|
0x61, 0x72, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
|
|
|
|
|
0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
|
|
|
|
|
0x69, 0x65, 0x72, 0x0, 0x0, 0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0x0, 0x0, 0x0, 0x19, 0x0, 0x0, 0x0, 0x0, 0x63, 0x74, 0x79,
|
|
|
|
|
0x70, 0x65, 0x33, 0x31, 0x0, 0x0, 0x0, 0x0, 0x1f, 0x63, 0x74,
|
|
|
|
|
0x79, 0x70, 0x65, 0x33, 0x32, 0x0, 0x0, 0x0, 0x0, 0x20, 0x63,
|
|
|
|
|
0x74, 0x79, 0x70, 0x65, 0x33, 0x33, 0x0, 0x0, 0x0, 0x0, 0x21,
|
|
|
|
|
0x63, 0x74, 0x79, 0x70, 0x65, 0x33, 0x34, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x22, 0x63, 0x74, 0x79, 0x70, 0x65, 0x33, 0x35, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
|
|
|
|
|
},
|
|
|
|
|
{ prop2, value2, 4, 2, 646,
|
|
|
|
|
{0x0, 0x4, 0x0, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0, 0x74, 0x65, 0x73, 0x74,
|
|
|
|
@ -392,7 +515,63 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
0x73, 0x61, 0x67, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
|
|
|
|
|
0x6, 0x0, 0x0, 0x0, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x0, 0x54,
|
|
|
|
|
0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20,
|
|
|
|
|
0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x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70, 0x65, 0x33, 0x33, 0x0, 0x0, 0x0, 0x0, 0x21,
|
|
|
|
|
0x63, 0x74, 0x79, 0x70, 0x65, 0x33, 0x34, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x22, 0x63, 0x74, 0x79, 0x70, 0x65, 0x33, 0x35, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x23, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x0, 0x0, 0x5, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x31, 0x0,
|
|
|
|
|
0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65,
|
|
|
|
|
0x20, 0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x6, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
|
|
|
|
0x32, 0x0, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74,
|
|
|
|
|
0x68, 0x65, 0x20, 0x75, 0x73, 0x61, 0x67, 0x65, 0x0, 0x0, 0x0,
|
|
|
|
|
0x0, 0x1}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
int i;
|
|
|
|
@ -404,7 +583,8 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
propTest = new BPropertyInfo(theTests[i].props, theTests[i].values);
|
|
|
|
|
TestProperty(propTest, theTests[i].props, theTests[i].values,
|
|
|
|
|
theTests[i].prop_count, theTests[i].value_count,
|
|
|
|
|
theTests[i].flat_size, theTests[i].flat_data);
|
|
|
|
|
theTests[i].flat_size, theTests[i].lflat_data,
|
|
|
|
|
theTests[i].bflat_data);
|
|
|
|
|
delete propTest;
|
|
|
|
|
|
|
|
|
|
propPtr = DuplicateProperties(theTests[i].props, theTests[i].prop_count);
|
|
|
|
@ -412,15 +592,26 @@ const uint32 PropertyTestcase::wildcardSpecifierTests[] = { uniqueSpecifier,
|
|
|
|
|
propTest = new BPropertyInfo(propPtr, valuePtr, true);
|
|
|
|
|
TestProperty(propTest, theTests[i].props, theTests[i].values,
|
|
|
|
|
theTests[i].prop_count, theTests[i].value_count,
|
|
|
|
|
theTests[i].flat_size, theTests[i].flat_data);
|
|
|
|
|
theTests[i].flat_size, theTests[i].lflat_data,
|
|
|
|
|
theTests[i].bflat_data);
|
|
|
|
|
delete propTest;
|
|
|
|
|
|
|
|
|
|
propTest = new BPropertyInfo;
|
|
|
|
|
assert(propTest->Unflatten(B_PROPERTY_INFO_TYPE, theTests[i].flat_data,
|
|
|
|
|
assert(propTest->Unflatten(B_PROPERTY_INFO_TYPE, theTests[i].lflat_data,
|
|
|
|
|
theTests[i].flat_size) == B_OK);
|
|
|
|
|
TestProperty(propTest, theTests[i].props, theTests[i].values,
|
|
|
|
|
theTests[i].prop_count, theTests[i].value_count,
|
|
|
|
|
theTests[i].flat_size, theTests[i].flat_data);
|
|
|
|
|
theTests[i].flat_size, theTests[i].lflat_data,
|
|
|
|
|
theTests[i].bflat_data);
|
|
|
|
|
delete propTest;
|
|
|
|
|
|
|
|
|
|
propTest = new BPropertyInfo;
|
|
|
|
|
assert(propTest->Unflatten(B_PROPERTY_INFO_TYPE, theTests[i].bflat_data,
|
|
|
|
|
theTests[i].flat_size) == B_OK);
|
|
|
|
|
TestProperty(propTest, theTests[i].props, theTests[i].values,
|
|
|
|
|
theTests[i].prop_count, theTests[i].value_count,
|
|
|
|
|
theTests[i].flat_size, theTests[i].lflat_data,
|
|
|
|
|
theTests[i].bflat_data);
|
|
|
|
|
delete propTest;
|
|
|
|
|
}
|
|
|
|
|
}
|