top of page

Meals & nutrition

Public·4 members
Hunter Lee
Hunter Lee

Testgen 7 For Mac _VERIFIED_



Home A Message from Donald Knuth Getting Started The MMIX Supplement Contributing Development Proposals Bug Reports Resources Sources Documentation Win32 Executables Linux 32 Bit Binaries MAC OSX Executables MMIXVD the Visual Debugger Patches, Extensions & Tools Examples Links Das MMIX Buch Virtual Motherboard Other Material MMIX at Munich University of Applied Sciences Impressum Privacy testgen A tool to generate test cases.Usagetestgen [-Ipath] [-Xextension] [-M] [-M] inputfile.tstgenerates a series of .mms files from an input file.Options -Ipath add path to the list of directories searched for include files. -Xextension set the extension for the output files. Default: mms -M (can be used twice) generate rules for a Makefile (see below). Input filesThe initial input file must be given on the command line.Other input files must be on the search path (see below).An input file contains:specials and plain text.Plain text is just copied to the output file (if an output file is open).At program start, no output file is open. An output file is opened and closed with a test declaration (see below).Specials are: Comments, Variable Definitions, Variables, Include Files, and Test Declarations.All specials start with [[ and end with ]].SpecialsTest DeclarationA Test Declaration has two parts:[[TEST number]]then some text [[END number]]The number in the TEST and in the END special must be the same.If there are (as usual) multiple test declarations in the input file,they must not overlap and the numbers must be in increasing order.The [[TEST number]] opens the output file, the [[END number]] closes the output file.The name of the output file is formed by the number given in the TEST special, followed by '-', followed by the name of the initial input file, followed by '.', followedby the output file extension. The output file extension is mms by default and can bechanged with the -X option (see above).As said before, the text between the TEST and END special is copied written to the output file.CommentsA Comment has the form[[COMMENT some text]]or[[space some text]]The text inside the comment special is just ignored.The text inside the comment may contain other specials.Include FilesThe special [[INCLUDE filename optionalArguments]]opens the named file. Using the following search procedure:First the program tries to open the file using the filename as given.If that is not successful, the directory names from the search path areprepended to the filename, and an attempt is made to open the file.The search path contains the following entries:the "lib" subdirectory of the current directory,the current directory,the "lib" subdirectory of the directory where the program testgen is located (you can download the lib directory used for the MMIX supplement here: lib.zip),the directory where the program testgen is located, and any directories given on the command line with the -I option (see above).If the program could be opened for reading its contentsreplaces the special [[INCLUDE ...]] and reading continues with the first characterof the file just opened. At the end of the file, reading willcontinue with the first character after the INCLUDE special.An explanation of the optional Arguments follows below.A collection of useful include files is found in the lib directory.It contains the includ files I used when writing tests for the MMIX Supplement.Variable DefinitionsThe specials [[SET name some text]]and[[GLOBAL name some text]]define a new variable with the given name and assign itthe given text as value.The name may consists of upper- and lower-case letters andthe decimal digits from 0 to 9. It must not be one of the special names SET, GLOBAL, COMMENT, TEST, END, or INCLUDE.The value of a variable can be any text. It may contain properly nested'[[' and ']]' pairs. So the value may contain specials.The SET special defines a local variable, the GLOBAL special defines a globalvariable.VariablesThe special [[name OptionalArguments]] requires the name of a previously defined variable. The special [[name ...]] is then replaced by the value of that variable and reading continues with the first character of that value.An explanation of the optional arguments follows below.ScopeVariables are defined within a scope and are deleted, when the scopeends. Scopes can be nested. Variables in outer scopescan be used in inner scopes, but they can also be shadowed byvariables of the same name in inner scopes.The outermost scope starts with the initial input file and ends with this file. All global variables are defined in this scope.Every Test has its own scope. It starts with the "[[TEST ...]]" specialand ends with the "[[END ...]]" special.Every include file has its own scope. It starts with the "[[INCLUDE ..."special and ends with the end of the include file.Every value of a variable has its own scope, it starts with "[[SET name"or "[[GLOBAL name"and ends with the end of the value of the variable.Include files as well as variables can be arbitrarily mixed and nested.Optional ArgumentsVariable values and include files can have parameters.These are bound to local variables with the names 1, 2, 3, ...If an include or variable special has optional arguments,first the new scope for the file or the value is created andthen the optional arguments are assigned to the variables 1, 2, 3, ... in the order in which they are listed.Inside the file or the value, they can be used as [[1]], [[2]], ...The values of optional arguments are just text. The text may containproperly nested '[[' and ']]' pairs. Multiple arguments areseparated by white space outside of '[[' and ']]' pairs.ExampleSuppose we have a simple file called "set17.mms" as follows:SET $1,17and we want to test this code. We can use the following file "set17.tst":[[SET DRIVERLOC#100MainSET$3,123[[INCLUDE set17.mms]]CMP$0,[[register]],[[number]]BNZ$0,ErrorSET$255,0; TRAP 0,Halt,0ErrorSET$255,1; TRAP 0,Halt,0]][[SET register $1]][[TEST 1]][[COMMENT first test: set variable number and expand DRIVER into 1-set17.tst.mms]][[SET number 17]][[DRIVER]][[END 1]][[TEST 2]][[COMMENT second test: shadow register, set number and expand DRIVER into 2-set17.tst.mms]][[SET register $3]][[SET number 123]][[DRIVER]][[END 2]]Callingtestgen set17.tstwill generate two files: 1-set17.tst.mms and 2-set17.tst.mms1-set17.tst.mms: LOC #100Main SET $3,123 SET $1,17 CMP $0,$1,17 BNZ $0,Error SET $255,0; TRAP 0,Halt,0Error SET $255,1; TRAP 0,Halt,02-set17.tst.mms: LOC #100Main SET $3,123 SET $1,17 CMP $0,$3,123 BNZ $0,Error SET $255,0; TRAP 0,Halt,0Error SET $255,1; TRAP 0,Halt,0Example 2The following file bubble.tst tests bubble.mms containing theprocedure BubbleSort.After specifying the Driver code that includes the Program fragment under test and the predefined code OctaEqual to testtwo OCTA Arrays for equality, there are 6 tests, that usethe variables In, Out and n to specify several test parameters.[[SET DriverLOCData_SegmentGREG@Data[[In]]SizeIS[[n]]Sorted[[Out]]LOC#100MainLDA$1,DataSET$2,SizePUSHJ$0,BubbleSort[[INCLUDE OctaEqual.mms Data Sorted Size]] SET$255,$0 TRAP 0,Halt,0[[INCLUDE bubble.mms]]]][[TEST 1]][[SET In OCTA 5,0]][[SET n 1]][[SET Out OCTA 5,0]][[Driver]][[END 1]][[TEST 2]][[SET In OCTA 5,2,0]][[SET n 2]][[SET Out OCTA 2,5,0]][[Driver]][[END 2]][[TEST 3]][[SET In OCTA 2,5,0]][[SET n 2]][[SET Out OCTA 2,5,0]][[Driver]][[END 3]][[TEST 4]] [[SET In OCTA 3,2,5,0]] [[SET n 3]] [[SET Out OCTA 2,3,5,0]] [[Driver]][[END 4]][[TEST 5]][[SET In OCTA 5,3,2,5,0]][[SET n 4]][[SET Out OCTA 2,3,5,5,0]][[Driver]][[END 5]][[TEST 6]][[SET In OCTA 5,3,2,5,7,11,-3,2,99,5,0]][[SET n 10]][[SET Out OCTA -3,2,2,3,5,5,5,7,11,99,0]][[Driver]][[END 6]]Sourcestestgen is written as a short lex file testgen.l. Building testgenUnder Linux, to build testgen from the source file, you need to generate testgen.c using flex,then compile it together with symtab.c,and link it with the flex library.Both c files will need the include file symtab.h.flex -o testgen.c testgen.lgcc testgen.c symtab.c -lfl -o testgenExecutablesYou can download an executable for 32-Bit Linux here: testgen,for 32-Bit Windows here: testgen.exe,and for OSX you find it here: testgen.




Testgen 7 For Mac



bigdecimal (1.2.0)builder (3.2.2)bundler (1.10.6)bundler-unload (1.0.2)childprocess (0.5.8, 0.5.7)chunky_png (1.3.5)cucumber (2.1.0)cucumber-core (1.3.0)data_magic (0.21)diff-lcs (1.2.5)executable-hooks (1.3.2)faker (1.6.1)ffi (1.9.10)gem-wrappers (1.2.7)gherkin3 (3.1.2)headless (2.2.0)i18n (0.7.0)io-console (0.4.2)json (1.7.7)minitest (4.3.2)multi_json (1.11.2)multi_test (0.1.2)oily_png (1.2.0)page-object (1.1.0)page_navigation (0.9)psych (2.0.0)rake (10.4.2, 0.9.6)rdoc (4.0.0)require_all (1.3.3)rspec (3.4.0)rspec-core (3.4.1)rspec-expectations (3.4.0)rspec-mocks (3.4.0)rspec-support (3.4.1)rubygems-bundler (1.4.4)rubyzip (1.1.7)rvm (1.11.3.9)selenium-webdriver (2.48.1)test-unit (2.0.0.0)testgen (0.8.7)thor (0.19.1)watir-webdriver (0.9.1)websocket (1.2.2)yard (0.8.7.6)yml_reader (0.5)


bigdecimal (1.3.2, 1.2.0)builder (3.2.3, 3.2.2)bundler (1.15.2, 1.10.6)bundler-unload (1.0.2)childprocess (0.7.1, 0.5.8, 0.5.7)chunky_png (1.3.8, 1.3.5)connection_pool (2.2.1)cucumber (2.4.0, 2.1.0)cucumber-core (1.5.0, 1.3.0)cucumber-wire (0.0.1)data_magic (1.0, 0.21)diff-lcs (1.3, 1.2.5)executable-hooks (1.3.2)faker (1.6.1)ffi (1.9.18, 1.9.10)gem-wrappers (1.3.0, 1.2.7)gherkin (4.1.3)gherkin3 (3.1.2)headless (2.3.1, 2.2.0)i18n (0.8.6, 0.7.0)io-console (0.4.6, 0.4.2)json (2.1.0, 1.7.7)minitest (5.10.2, 4.3.2)multi_json (1.12.1, 1.11.2)multi_test (0.1.2)oily_png (1.2.1, 1.2.0)page-object (1.1.0)page_navigation (0.10, 0.9)power_assert (1.0.2)psych (2.2.4, 2.0.0)rake (12.0.0, 10.4.2, 0.9.6)rdoc (5.1.0, 4.0.0)require_all (1.4.0, 1.3.3)rspec (3.6.0, 3.4.0)rspec-core (3.6.0, 3.4.1)rspec-expectations (3.6.0, 3.4.0)rspec-mocks (3.6.0, 3.4.0)rspec-support (3.6.0, 3.4.1)rubygems-bundler (1.4.4)rubyzip (1.2.1, 1.1.7)rvm (1.11.3.9)selenium-webdriver (3.4.4, 2.48.1)test-unit (3.2.5, 2.0.0.0)testgen (0.9, 0.8.7)thor (0.19.4, 0.19.1)watir-webdriver (0.9.9, 0.9.1)websocket (1.2.4, 1.2.2)yard (0.9.9, 0.8.7.6)yml_reader (0.7, 0.5)


About

Welcome to the group! You can connect with other members, ge...

Members

  • Chantel Preston
  • Rafael Valdes
    Rafael Valdes
  • Theodore Harris
    Theodore Harris
  • Hunter Lee
    Hunter Lee
bottom of page