Skip to content

Commit 28ac74a

Browse files
committed
Refine trace command descriptions
Updated the trace command files to specify required operations explicitly. Improved documentation without modifying test data. Change-Id: If8ef44171bb5cc3cfee812d74cc33d55f6f1320b
1 parent 1d68fae commit 28ac74a

18 files changed

+19
-17
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ Trace files
111111
* They are short and simple.
112112
* We encourage to study them to see what tests are being performed.
113113
* XX is the trace number (1-17). CAT describes the general nature of the test.
114+
* All functions that need to be implemented are explicitly listed.
115+
* If a colon is present in the title, all functions mentioned afterwards must be correctly implemented for the test to pass.
114116
* `traces/trace-eg.cmd` : A simple, documented trace file to demonstrate the operation of `qtest`
115117

116118
## Debugging Facilities

traces/trace-01-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head and remove_head
1+
# Test of 'q_new', 'q_insert_head', and 'q_remove_head'
22
option fail 0
33
option malloc 0
44
new

traces/trace-02-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head, insert_tail, remove_head, remove_tail, and delete_mid
1+
# Test of 'q_new', 'q_insert_head', 'q_insert_tail', 'q_remove_head', 'q_remove_tail', and 'q_delete_mid'
22
option fail 0
33
option malloc 0
44
new

traces/trace-03-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head, insert_tail, remove_head, reverse and merge
1+
# Test of 'q_new', 'q_insert_head', 'q_remove_head', 'q_reverse', 'q_sort', and 'q_merge'
22
option fail 0
33
option malloc 0
44
new

traces/trace-04-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head, insert_tail, size, swap, and sort
1+
# Test of 'q_new', 'q_insert_tail', 'q_insert_head', 'q_remove_head', 'q_size', 'q_swap', and 'q_sort'
22
option fail 0
33
option malloc 0
44
new

traces/trace-05-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head, insert_tail, remove_head, reverse, size, swap, and sort
1+
# Test of 'q_new', 'q_free', 'q_insert_head', 'q_insert_tail', 'q_remove_head', 'q_reverse', 'q_size', 'q_swap', and 'q_sort'
22
option fail 0
33
option malloc 0
44
new

traces/trace-06-ops.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of insert_head, insert_tail, delete duplicate, sort, descend and reverseK
1+
# Test of 'q_new', 'q_free', 'q_insert_head', 'q_insert_tail', 'q_remove_head', 'q_delete_dup', 'q_sort', 'q_descend', and 'q_reverseK'
22
new
33
ih RAND 4
44
it gerbil 3

traces/trace-07-string.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of truncated strings
1+
# Test of truncated strings: 'q_new', 'q_free', 'q_insert_head', 'q_insert_tail', 'q_remove_head', 'q_reverse', and 'q_sort'
22
option fail 0
33
option malloc 0
44
new

traces/trace-08-robust.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test operations on empty queue
1+
# Test operations on empty queue: 'q_new', 'q_remove_head', 'q_reverse', 'q_size', and 'q_sort'
22
option fail 10
33
option malloc 0
44
new

traces/trace-09-robust.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test remove_head with NULL argument
1+
# Test 'q_remove_head' with NULL argument: 'q_new', 'q_insert_head', and 'q_remove_head'
22
option fail 10
33
option malloc 0
44
new

traces/trace-10-robust.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test operations on NULL queue
1+
# Test operations on NULL queue: 'q_free', 'q_insert_head', 'q_insert_tail', 'q_remove_head', 'q_reverse', 'q_size', and 'q_sort'
22
option fail 10
33
option malloc 0
44
free

traces/trace-11-malloc.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of malloc failure on insert_head
1+
# Test of malloc failure on 'q_insert_head': 'q_new', and 'q_insert_head'
22
option fail 30
33
option malloc 0
44
new

traces/trace-12-malloc.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of malloc failure on insert_tail
1+
# Test of malloc failure on 'q_insert_tail': 'q_new', 'q_insert_head', and 'q_insert_tail'
22
option fail 50
33
option malloc 0
44
new

traces/trace-13-malloc.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test of malloc failure on new
1+
# Test of malloc failure on 'q_new': 'q_new'
22
option fail 10
33
option malloc 50
44
new

traces/trace-14-perf.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test performance of insert_tail, reverse, and sort
1+
# Test performance of 'q_new', 'q_insert_head', 'q_insert_tail', 'q_reverse', and 'q_sort'
22
option fail 0
33
option malloc 0
44
new

traces/trace-15-perf.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test performance of sort with random and descending orders
1+
# Test performance of 'q_sort' with random and descending orders: 'q_new', 'q_free', 'q_insert_head', 'q_sort', and 'q_reverse'
22
# 10000: all correct sorting algorithms are expected pass
33
# 50000: sorting algorithms with O(n^2) time complexity are expected failed
44
# 100000: sorting algorithms with O(nlogn) time complexity are expected pass

traces/trace-16-perf.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test performance of insert_tail
1+
# Test performance of 'q_new', 'q_insert_head', 'q_insert_tail', and 'q_reverse'
22
option fail 0
33
option malloc 0
44
new

traces/trace-17-complexity.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Test if time complexity of q_insert_tail, q_insert_head, q_remove_tail, and q_remove_head is constant
1+
# Test if time complexity of 'q_insert_tail', 'q_insert_head', 'q_remove_tail', and 'q_remove_head' is constant
22
option simulation 1
33
it
44
ih

0 commit comments

Comments
 (0)