Changeset 9736 for trunk/psLib/test/types
- Timestamp:
- Oct 24, 2006, 2:16:33 PM (20 years ago)
- Location:
- trunk/psLib/test/types
- Files:
-
- 3 edited
-
Makefile.am (modified) (1 diff)
-
execute_tap (modified) (2 diffs)
-
tap_psMetadata_copying.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/types/Makefile.am
r9143 r9736 29 29 tap_psBitSet_all \ 30 30 tap_psList_all \ 31 tap_psLookupTable_all 31 tap_psLookupTable_all \ 32 tap_psMetadataConfig_output \ 33 tap_psMetadataConfig_input 32 34 33 35 if BUILD_TESTS -
trunk/psLib/test/types/execute_tap
r9143 r9736 1 make 1 make test 2 2 ./tap_psArray_all 3 3 ./tap_psListIterator … … 18 18 ./tap_psList_all 19 19 ./tap_psLookupTable_all 20 ./tap_psMetadataConfig_output 21 ./tap_psMetadataConfig_input -
trunk/psLib/test/types/tap_psMetadata_copying.c
r9720 r9736 23 23 int main(void) 24 24 { 25 plan_tests(3 4);25 plan_tests(35); 26 26 27 27 diag("psMetadataCopy and psMetadataItemCopy tests"); … … 59 59 out = NULL; 60 60 } 61 //Return NULL for attempt to copy item of unsupported data type 61 //Return NULL for attempt to copy item of unsupported data type - NULL out metadata 62 psMetadataItem *notype = NULL; 62 63 { 63 64 in = psMetadataAlloc(); 64 65 psMetadataAddS32(in, PS_LIST_HEAD, "S32", 0, "", 1); 65 psMetadataItem *notype = psMetadataGet(in, PS_LIST_HEAD); 66 // notype->type = PS_DATA_METADATA_MULTI + 1000; 66 notype = psMetadataGet(in, PS_LIST_HEAD); 67 67 notype->type = -1; 68 psFree(outTest); 69 outTest = NULL; 68 outTest = psMetadataCopy(out, in); 69 ok( outTest == NULL, 70 "psMetadataCopy: return NULL for metadata with item of bad type."); 71 psFree(out); 72 out = NULL; 73 } 74 //Return NULL for attempt to copy item of unsupported data type - allocated out metadata 75 { 76 out = psMetadataAlloc(); 77 psMetadataAddS32(out, PS_LIST_TAIL, "S32", 0, "", 2); 70 78 outTest = psMetadataCopy(out, in); 71 79 ok( outTest == NULL, 72 80 "psMetadataCopy: return NULL for metadata with item of bad type."); 73 81 notype->type = PS_DATA_S32; 82 psFree(out); 83 out = NULL; 74 84 psFree(in); 75 85 in = NULL; 76 psFree(out);77 out = NULL;78 86 } 79 87
Note:
See TracChangeset
for help on using the changeset viewer.
