readme

来自「db.* (pronounced dee-be star) is an adva」· 代码 · 共 95 行

TXT
95
字号
db.star Test Suitedb.* includes a test suite primarily for developers who will be editing thecode to db.* itself.  This suite tests the functionality of the d_functionsprovided by the db.* API.  Output is presented in a straightforward manner toSTDOUT, listing whether each unit test has passed or failed.  The main test program runs as a single process and currently requires no fileI/O as to be the most compatible with different kinds of embedded systems.The main program runs several smaller unit tests defined as C functions,probing specific functionality of the system.How to run==========To run the test suite after building db.*, use the command:make checkThis command will build and run the test suite. A database file will be createdin the current directory by the test suite.You can also build and install the test program with the command:make installcheckSee readme.1st for more information on using the test suites with across-compiler.Tests=====All tests are broken down into related subsets.  A description of each subsetand the d_functions tested, are listed below.Set01 - Database ModificationThis set works with database level modification functions like d_open andd_close.  These are the first tests to be run, because they are required forall other database access tasks.functions tested:    d_sopen()    d_opentask()    d_initialize()    d_close()    d_closetask()Set02 - Data ManipulationThis set tests functions that manipulate the actual data within the database.This includes adding/updating/deleting records and their fields.functions tested:    d_fillnew()    d_recread()    d_crwrite()    d_crread()    d_delete()Set03 - Data RetrievalThis set tests different methods of retrieving data from the databaseincluding access via indexed key or via set pointers.functions tested:    these tests are not yet implementedAdding Tests============The current suite does not test all d_functions.  Adding new tests isstraightforward, but requires editing the source files.To Add A New Test:    1. find the proper set in which the test belongs    2. add the function definition to set##.c file    3. add the function prototype to set##.h file    4. add the function name to set##[] array in set##.c    5. increase value of set##_length constant in set##.cTo Add A New Test Set:    1. create a set##.c file    2. create a set##.h file    3. include set##.h in the test.c file    4. call the set##_tests() function within run_tests() in test.c

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?