Changeset 15986 for trunk/psModules/test/config/tap_pmConfigMask.c
- Timestamp:
- Jan 2, 2008, 10:49:57 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/config/tap_pmConfigMask.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/config/tap_pmConfigMask.c
r14882 r15986 5 5 * This code will test the pmConfigMask() routine. 6 6 * 7 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $8 * @date $Date: 200 7-09-18 18:58:56$7 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2008-01-02 20:49:10 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 psTraceSetLevel(".", 0); 26 26 psTraceSetLevel("err", ERR_TRACE_LEVEL); 27 plan_tests( 9);27 plan_tests(7); 28 28 29 29 … … 37 37 str[0] = "ARGS:"; 38 38 str[1] = "-site"; 39 str[2] = "data /SampleIPPConfig";39 str[2] = "dataFiles/SampleIPPConfig"; 40 40 psS32 argc = 3; 41 41 pmConfig *config = pmConfigRead(&argc, str, "RecipeName"); 42 if (!config) { 43 str[2] = "../dataFiles/SampleIPPConfig"; 44 config = pmConfigRead(&argc, str, "RecipeName"); 45 } 42 46 ok(config != NULL, "pmConfigRead() successful"); 43 47 ok(!pmConfigMask(NULL, config), "pmConfigMask() returned NULL with NULL masks input param"); … … 49 53 // Test pmConfigMask() with NULL pmConfig input param 50 54 // XXX: This fails on current CVS code because there is no assert in pmConfigMask() for a null pmConfig param 51 {55 if (0) { 52 56 psMemId id = psMemGetId(); 53 57 char *masks = "Mask0 Mask1 Mask2"; … … 61 65 { 62 66 psMemId id = psMemGetId(); 63 // See file TESTDIR/config/data/recipes_masks.config (67 // See file ../dataFiles/recipes_masks.config ( 64 68 char *masks = "DETECTOR RANGE"; 65 69 psMaskType correctMask = 0x02 | 0x04; … … 67 71 str[0] = "ARGS:"; 68 72 str[1] = "-site"; 69 str[2] = "data /SampleIPPConfig";73 str[2] = "dataFiles/SampleIPPConfig"; 70 74 psS32 argc = 3; 71 75 pmConfig *config = pmConfigRead(&argc, str, "RecipeName"); 76 if (!config) { 77 str[2] = "../dataFiles/SampleIPPConfig"; 78 config = pmConfigRead(&argc, str, "RecipeName"); 79 } 72 80 ok(config != NULL, "pmConfigRead() successful"); 81 skip_start(config == NULL, 2, "Skipping tests because pmConfigRead() failed"); 73 82 psMaskType mask = pmConfigMask(masks, config); 74 ok(mask, "pmConfigMask non-zero with acceptable input params");83 ok(mask, "pmConfigMask returned non-zero with acceptable input params"); 75 84 ok(mask == correctMask, "pmConfigMask() generated the correct output mask (%x). Should be (%x)", mask, correctMask); 85 skip_end(); 76 86 psFree(config); 77 87 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
Note:
See TracChangeset
for help on using the changeset viewer.
