Abstract -------- This document describes a set of commands that have been written to increase the productivity of wizards and approval arches in the development of common MUD objects like: armours, weapons and rooms. Conceptually these objects are "black boxes" which implement a protocol. It is possible, to a large extent, to test these "black boxes" using an automated test tool. The tool would simply utilize the protocol to determine whether the "black box" acts as it supposed to. The result is a automated (a quantifiable) definition of quality. One can say, "This armour does all required initialization that an armor must do", for example. It cannot answer questions like: "Are there typographical errors in the various descriptions of this room?" or even "Will this weapon actually work on a running MUD?" These latter sorts of questions can only be answered through code inspection, and eventually through actual use. These tools, then, are not intended (nor are they capable) of replacing the approval process. Instead, they are intended to shorten the approval process turnaround time by reducing the number (and types) of checks the approval arches need make, and thus, shorten the amount of time it takes to approve new objects. At the same time, making these tools available to wizards developing new objects will reduce the number of bugs being submitted for approval due to the fact that they will have run them before the approval process has even begun. Introduction ------------ The tools that exist to date are: acheck Armour Checker rcheck Room Checker wcheck Weapon Checker Each command takes a single object as an argument. In the case of the armour and weapon checkers the argument is the id of the object to check. In the case of the room checker the file name of the room is passed. Invoking rcheck without any arguments will check the current environment, (i.e. the room you are standing in). Each checker operates in 2 passes: Pass 1: Check the validity of the object. Pass 2: Print the various attributes of the object. If pass 1 does not succeed it will display a set of warning messages, indicating the errors that were found. Those errors should be resolved immediately by the developer. If pass 1 succeeds, pass 2 will be called to display the objects' attributes. All relevant object attributes should be displayed. (If not, then I made a mistake.) Many of these attributes are messages, like: the object short and long descriptions, item descriptions, wear and wield message, etc. The checker can only insure that the information returned is a string. The approval process will need to check these message carefully by hand. Although the checker cannot insure correctly spelling and content, it does attempt to display them in such a way as to make review simple and easy. What Checking is Actually Done? ------------------------------- The rest of this document is divided into sections for each object checker. They will present exactly what checks are being made. The checks come right from the /doc/build/*/tutorial documents, so they should *not* be a suprise to anyone. As always, if you find problems in the checks being made or bugs in the checkers themselves, send a Nightmare Form 1162A in triplicate to the Board for Considering Informal Change, and follow the instructions on the form. Armour Checker -------------- 1. Assert that the object is a subclass of or has been cloned from /std/armour. All armour must inherit this object. 2. Assert that is_armour() returns an int and that the int is non-zero. If (1) passes (2) should *always* pass. 3. Assert that query_name() returns a string. 4. Assert that query_id() returns an array of strings. 5. Assert that query_short() returns a string. 6. Assert that query_long() returns a string. 7. Assert that query_type() returns a string, and that the string is one of the legal armour types. 8. Assert that query_ac() returns an int. 9. Assert that query_value() returns an int. 10. Assert that query_weight() returns an int. 11. Assert that query_limbs() returns an array of strings. 12. Assert that if query_wear_func() returns an object, then the function extra_wear() exists in the returned object. Room Checker ------------ 1. Assert that the object is a subclass of or has been cloned from /std/room. All rooms must inherit this object. 2. Assert that query_short() returns a string. 3. Assert that query_long() returns a string. Check for the several combinations of query("night long"), query("day long") and query("long"). 4. Assert that query_item_descriptions() returns an array of strings, and that query_item_description() for each member returns a string. 5. Assert that query_item_functions() returns an array of strings, and that query_item_function() for each member returns a string and that the string is the name of a function within the object. 6. Assert that query_destinations() returns an array of strings and that each string is the name of another object that can be loaded. To do: 7. Assert that query_pre_exit_functions() returns an array of strings, and that query_pre_exit_function() for each member returns a string and that the string is the name of a function within the object. 8. Assert that query_post_exit_functions() returns an array of strings, and that query_post_exit_function() for each member returns a string and that the string is the name of a function within the object. Weapon Checker -------------- 1. Assert that the object is a subclass of or has been cloned from /std/weapon. All weapons must inherit this object. 2. Assert that is_weapon() returns an int and that the int is non-zero. If (1) passes (2) should *always* pass. 3. Assert that query_name() returns a string. 4. Assert that query_id() returns an array of strings. 5. Assert that query_short() returns a string. 6. Assert that query_long() returns a string. 7. Assert that query_type() returns a string, and that the string is one of the legal weapon types. 8. Assert that query_ac() returns an int. 9. Assert that query_wc() returns an int. 10. Assert that query_value() returns an int. 11. Assert that query_weight() returns an int. 12. Assert that if query_wield_func() returns an object, then the function extra_wield() exists in the returned object. 13. Assert that if query_hit_func() returns an object, then the function extra_hit() exists in the returned object. 14. Assert that query_decay_rate() return an int. To Dos ------ 1. Import the legal types arrays from somewhere 2. Do balance checks on ac, wc, value and weight of weapons and armour. 3. Write an _mcheck.c (Monster Checker) 4. Write an _icheck.c (Item Checker) 5. Report actions for various objects