Ignore:
Timestamp:
Jun 22, 2008, 12:01:30 PM (17 years ago)
Author:
cinc
Message:

More unit test stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/c/nom-play.c

    r360 r361  
    6565#include "nomstring.h"
    6666#include "nommethod.h"
     67#include "nomtestresult.h"
     68#include "testnomobject.h"
    6769
    6870#define ULONG_TESTVALUE_1         0xffeeddcc
     
    213215
    214216
     217void printTestResults(NOMArray* nArray)
     218{
     219  int a;
     220
     221  for(a=0; a < NOMArray_length(nArray, NULL) ; a++)
     222  {
     223    g_message("Test '%s()': %s", _queryString(NOMTestResult_queryName(NOMArray_queryObjectAtIdx(nArray, a, NULL), NULL), NULL),
     224               NOMTestResult_success(NOMArray_queryObjectAtIdx(nArray, a, NULL), NULL) ? "Ok" : "Not ok");
     225  }
     226}
     227
    215228/**
    216229   Main entry point for the idl compiler.
     
    223236  BClass*  bObject;
    224237  NOMArray* nArray;
     238  TestNomObject* tstNomObject;
    225239  int a;
    226240 
     
    259273  NOMClassMgrObject=nomEnvironmentNew();
    260274 
     275  nomPrintf("\n");
     276  g_message("Testing NOMObject");
     277  tstNomObject=TestNomObjectNew();
     278  _setClassMgrObject(tstNomObject, NOMClassMgrObject, NULL);
     279  nArray=_runTests(tstNomObject, NULL);
     280  printTestResults(nArray);
     281  exit(0);
     282 
    261283  g_message("\n");
    262284  g_message("================================================================");
Note: See TracChangeset for help on using the changeset viewer.