runTests.c

00001 /*
00002 # This file is Copyright 2003, 2006, 2007, 2009 Dean Hall.
00003 #
00004 # This file is part of the Python-on-a-Chip program.
00005 # Python-on-a-Chip is free software: you can redistribute it and/or modify
00006 # it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
00007 #
00008 # Python-on-a-Chip is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00011 # A copy of the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1
00012 # is seen in the file COPYING up one directory from this.
00013 */
00014 
00015 
00016 #include <stdio.h>
00017 #include "CuTest.h"
00018 
00019 
00020 /* Need to declare this array since no PyMite application is linked */
00021 const unsigned char usr_nat_fxn_table[] = {};
00022 
00023 CuSuite *getSuite_testHeap(void);
00024 CuSuite *getSuite_testDict(void);
00025 CuSuite *getSuite_testList(void);
00026 CuSuite *getSuite_testSeglist(void);
00027 CuSuite *getSuite_testCodeObj(void);
00028 CuSuite *getSuite_testFuncObj(void);
00029 CuSuite *getSuite_testIntObj(void);
00030 CuSuite *getSuite_testInterp(void);
00031 CuSuite *getSuite_testStringObj(void);
00032 CuSuite *getSuite_testTupleObj(void);
00033 
00034 
00035 int main(void)
00036 {
00037     CuString *output = CuStringNew();
00038     CuSuite *suite = CuSuiteNew();
00039 
00040     CuSuiteAddSuite(suite, getSuite_testHeap());
00041     CuSuiteAddSuite(suite, getSuite_testSeglist());
00042     CuSuiteAddSuite(suite, getSuite_testDict());
00043     CuSuiteAddSuite(suite, getSuite_testList());
00044     CuSuiteAddSuite(suite, getSuite_testCodeObj());
00045     CuSuiteAddSuite(suite, getSuite_testFuncObj());
00046     CuSuiteAddSuite(suite, getSuite_testIntObj());
00047     CuSuiteAddSuite(suite, getSuite_testInterp());
00048     CuSuiteAddSuite(suite, getSuite_testStringObj());
00049     CuSuiteAddSuite(suite, getSuite_testTupleObj());
00050 
00051     CuSuiteRun(suite);
00052     CuSuiteSummary(suite, output);
00053     CuSuiteDetails(suite, output);
00054     puts(output->buffer);
00055 
00056     /*
00057      * Zero failures indicates an all-good exit code.
00058      * Any errors gives a non-zero exit code that should stop the build
00059      * when this is called by the Makefile
00060      */
00061     return suite->failCount;
00062 }

Generated on Mon Oct 18 07:40:47 2010 for Python-on-a-chip by  doxygen 1.5.9