Show
Ignore:
Timestamp:
09/09/10 22:40:57 (21 months ago)
Author:
westram
Message:
  • unit-test improvements (merged [6757] [6758] [6759] [6760] [6761] [6762] [6764] [6791] [6795] [6798] [6799] [6800] [6801] [6802] [6809] [6810])
    • moved file compare to test_unit.h
    • fake report for skipped tests
    • added templates for char compare
    • perform minihexdump
    • flush output
    • added
      • TEST_ASSERT_FILES_EQUAL__BROKEN
      • TEST_ASSERT_ZERO_OR_SHOW_ERRNO
    • create a fake.patch if there are no changes
    • all code affecting assertions in UNIT_TESTS-mode went to test_global.h
      • overwrites arb_assert()
    • undefine UNIT_TESTS for GDE submakefiles (foreign code there)
    • arb_test::FlushedOutput::errorf raises assertion itself
    • test against I/O errors
    • moved test code
    • refactored message printing
    • unit-tester switches to run directory itself
      • eliminates path hack for valgrind
    • control leak-check by variable
    • added global test-environment (does nothing yet)
Location:
trunk/UNIT_TESTER
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/UNIT_TESTER

    • Property svn:ignore
      •  

        old new  
        55*.gcno 
        66logs 
         7test_environment 
  • trunk/UNIT_TESTER/Makefile

    r6699 r6816  
    22.SUFFIXES: .o .cxx .depend 
    33 
    4 CPP_OBJECTS = \ 
     4TESTER_OBJECTS = \ 
    55        UnitTester.o \ 
    66 
     7GLOBAL_OBJECTS = \ 
     8        TestEnvironment.o \ 
    79 
    8 $(MAIN): $(CPP_OBJECTS) 
    9         $(LINK_STATIC_LIB) $(MAIN) $(CPP_OBJECTS) 
     10CPP_OBJECTS = $(TESTER_OBJECTS) $(GLOBAL_OBJECTS) 
     11 
     12$(MAIN): $(TESTER_OBJECTS) test_environment 
     13        $(LINK_STATIC_LIB) $(MAIN) $(TESTER_OBJECTS) 
     14 
     15test_environment: $(GLOBAL_OBJECTS) $(TESTER_OBJECTS) 
     16        $(LINK_EXECUTABLE) test_environment $(GLOBAL_OBJECTS) $(TESTER_OBJECTS) $(LIBPATH) $(ARBDB_LIB)   
     17 
    1018.cxx.o: 
    1119        $(CPP) $(cflags) -c $<  $(CPPINCLUDES) 
    1220 
    1321clean: 
    14         rm -f $(CPP_OBJECTS)  
     22        rm -f $(CPP_OBJECTS) *.a test_environment  
    1523        $(MAKE) -f Makefile.test clean 
     24 
    1625 
    1726DEPENDS = $(CPP_OBJECTS:.o=.depend) 
     
    3241# For formatting issues see SOURCE_TOOLS/fix_depends.pl 
    3342 
     43TestEnvironment.o: test_global.h 
     44TestEnvironment.o: test_unit.h 
     45TestEnvironment.o: UnitTester.hxx 
     46TestEnvironment.o: $(ARBHOME)/INCLUDE/ad_k_prot.h 
     47TestEnvironment.o: $(ARBHOME)/INCLUDE/ad_prot.h 
     48TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_assert.h 
     49TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_core.h 
     50TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_defs.h 
     51TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_error.h 
     52TestEnvironment.o: $(ARBHOME)/INCLUDE/arb_str.h 
     53TestEnvironment.o: $(ARBHOME)/INCLUDE/arbdb.h 
     54TestEnvironment.o: $(ARBHOME)/INCLUDE/arbdb_base.h 
     55TestEnvironment.o: $(ARBHOME)/INCLUDE/arbtools.h 
     56TestEnvironment.o: $(ARBHOME)/INCLUDE/attributes.h 
     57TestEnvironment.o: $(ARBHOME)/INCLUDE/dupstr.h 
     58TestEnvironment.o: $(ARBHOME)/INCLUDE/smartptr.h 
     59 
     60UnitTester.o: test_global.h 
    3461UnitTester.o: test_unit.h 
    3562UnitTester.o: UnitTester.hxx