Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3986

Show
Ignore:
Timestamp:
10/07/08 22:28:25 (1 month ago)
Author:
Jim Panic
Message:

stuff.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/tango.test/README

    r3984 r3986  
    1 Tango.test is an add-on library for Tango, including a domain specific language 
    2 to represent test collections (dtc - D Test Collection).  
     1Overview: 
     2--------- 
     3    Tango.test is an add-on library for Tango, including a domain specific  
     4    language to represent test collections (dtc - D Test Collection).  
    35 
    4 A typical dtc file looks as follows: 
     6   A typical dtc file looks as follows: 
    57 
    6 # TestCollection/TestSomething.dtc: 
    7 # --------------------------------- 
    8 # collection TestSomething; 
    9 #  
    10 # import tango.net.Socket; 
    11 #  
    12 # Test throws(AddressException) TestAddressException:  
    13 #     "Test whether AddressException is thrown as expected." 
    14 # { 
    15 #   Address.exception("test"); 
    16 # } 
    17 #  
    18 # Test TestAssert: "1 == 1, yay" 
    19 # { 
    20 #   assert(1 == 1); 
    21 # } 
    22  
    23 Usage: 
    24 ------ 
    25     Once you've installed TestSuite, create a base directory for your test 
    26     collections (preferably "TestCollections") and put some .dtc files in there. 
    27  
    28     Note: You can also write the D TestCase modules yourself in case you don't 
    29           trust/like the DSL. 
    30  
    31     $ TestSuite --base-dir=TestCollections 
    32  
    33     That's it. That's how you use tango.test. You're now officially a full 
    34     blown professional software tester, woohoo! \o/ 
     8    # TestCollection/TestSomething.dtc: 
     9    # --------------------------------- 
     10    # collection TestSomething; 
     11    #  
     12    # import tango.net.Socket; 
     13    #  
     14    # Test throws(AddressException) TestAddressException:  
     15    #     "Test whether AddressException is thrown as expected." 
     16    # { 
     17    #   Address.exception("test"); 
     18    # } 
     19    #  
     20    # Test TestAssert: "1 == 1, yay" 
     21    # { 
     22    #   assert(1 == 1); 
     23    # } 
    3524 
    3625Installation: 
     
    4029    http://dsource.org/projects/dsss . 
    4130 
    42     $ dsss build 
     31    The easiest way to use tango.test is to check out a specific release into 
     32    your project's working directory: 
    4333 
    44     That's it, you have the binary now. Use it. 
     34    $ svn co http://svn.dsource.org/projects/tango/branches/tango.test/releases/0.1/ 
     35 
     36    This will fetch all necessary files and place them accordingly. 
     37 
     38    After that, you just build it with: 
     39 
     40    $ dsss build --config=dsss.tango.test.conf 
     41 
     42Usage: 
     43------ 
     44    Once you've installed TestSuite, create a base directory for your test 
     45    collections (preferably "TestCollections") and put some .dtc files in there. 
     46 
     47 
     48    $ TestSuite --base-dir=TestCollections 
    4549 
    4650Configuration: 
     
    4852    As of now there's no implementation for a configuration file, but this will 
    4953    be added as soon as possible. 
    50  
  • branches/tango.test/tango/test/suite/TestSuite.d

    r3985 r3986  
    234234char[] _version = "0.1"; 
    235235char[] usage = "tango.test TestSuite version {1} 
    236 Usage: {0} [--help]"; 
     236Usage: {0} [--help|--version]"; 
    237237 
    238238void main (char[][] args) { 
     
    249249    }); 
    250250 
     251    parser.bindPosix("version", (char[] value) { 
     252        Stdout.formatln("tango.test TestSuite version {}", _version); 
     253        build = false; 
     254    }); 
     255 
    251256    parser.bindPosix("base-dir", (char[] value) { cfg.baseDir = value; }); 
    252257    parser.bindPosix("build-tool", (char[] value) { cfg.buildTool = value; });