IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24849


Ignore:
Timestamp:
Jul 17, 2009, 4:39:47 PM (17 years ago)
Author:
giebink
Message:

Added a constructor for dummyConceptCopier, an arg for the pmSpecAlloc() test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/concepts/tap_pmConcepts.c

    r21223 r24849  
    7777}
    7878
     79psMetadataItem *dummyConceptCopier(
     80    const psMetadataItem *source,
     81    const psMetadataItem *target,
     82    const psMetadata *cameraFormat,
     83    const pmFPA *fpa,
     84    const pmChip *chip,
     85    const pmCell *cell)
     86{
     87    if (target == NULL ||
     88        source == PM_CONCEPT_SOURCE_NONE ||
     89        cameraFormat == NULL ||
     90        fpa == NULL ||
     91        chip == NULL ||
     92        cell == NULL) {
     93        printf("dummyConceptCopier() args are NULL\n");
     94    }
     95    return(NULL);
     96}
    7997
    8098int main(int argc, char* argv[])
     
    92110        psMetadataItem *blank = psMetadataItemAlloc("myItem1", PS_DATA_BOOL, "I am a boolean", true);
    93111        pmConceptSpec *tmp = pmConceptSpecAlloc(blank, dummyConceptParser,
    94             dummyConceptFormatter, true);
     112            dummyConceptFormatter, dummyConceptCopier, true);
    95113        ok(tmp != NULL, "pmConceptSpecAlloc() returned non-NULL");
    96114        skip_start(tmp == NULL, 4, "Skipping tests because pmConceptSpecAlloc() returned NULL");
     
    98116        ok(tmp->parse == dummyConceptParser, "pmConceptSpecAlloc() set the ->parse member correctly");
    99117        ok(tmp->format == dummyConceptFormatter, "pmConceptSpecAlloc() set the ->format member correctly");
     118        ok(tmp->copy == dummyConceptCopier, "pmConceptSpecAlloc() set the ->copy member correctly");
    100119        ok(tmp->required == true, "pmConceptSpecAlloc() set the ->required member correctly");
    101120        skip_end();
     
    109128    {
    110129        psMemId id = psMemGetId();
    111         pmConceptSpec *tmp = pmConceptSpecAlloc(NULL, NULL, NULL, false);
     130        pmConceptSpec *tmp = pmConceptSpecAlloc(NULL, NULL, NULL, NULL, false);
    112131        ok(tmp != NULL, "pmConceptSpecAlloc() returned non-NULL with NULL inputs");
    113132        psFree(tmp);
Note: See TracChangeset for help on using the changeset viewer.