about summary refs log tree commit diff stats
path: root/subx
Commit message (Expand)AuthorAgeFilesLines
* 4439Kartik Agaram2018-07-271-8/+5
* 4438Kartik Agaram2018-07-271-1/+1
* 4437 - support for labels is half-doneKartik Agaram2018-07-272-0/+97
* 4436Kartik Agaram2018-07-271-2/+8
* 4435 - make instruction packing less strictKartik Agaram2018-07-272-1/+26
* 4434Kartik Agaram2018-07-2711-197/+209
* 4433Kartik Agaram2018-07-271-3/+3
* 4432Kartik Agaram2018-07-263-9/+9
* 4431 - operate exclusively in hexKartik Agaram2018-07-267-15/+13
* 4430Kartik Agaram2018-07-263-26/+26
* 4429 - syntax checking for multi-byte opcodesKartik Agaram2018-07-261-2/+49
* 4427 - support for '--trace' argvKartik Agaram2018-07-262-11/+49
* 4426 - error on unrecognized sub-commandsKartik Agaram2018-07-264-2/+13
* 4425Kartik Agaram2018-07-261-1/+4
* 4424Kartik Agaram2018-07-267-71/+70
* Use semicolons instead of commas for sequencingMaxwell Bernstein2018-07-261-14/+28
* 4423Kartik Agaram2018-07-261-8/+5
* 4420Kartik Agaram2018-07-261-6/+6
* 4419Kartik Agaram2018-07-261-2/+2
* 4416 - start collecting traces in runsKartik Agaram2018-07-261-0/+1
* Update dependency in ReadmeMax Bernstein2018-07-251-2/+2
* 4415Kartik Agaram2018-07-251-3/+7
* 4414 - subx: syntax checkingKartik Agaram2018-07-2510-121/+920
* 4413Kartik Agaram2018-07-253-6/+4
* 4412Kartik Agaram2018-07-251-1/+1
* 4411Kartik Agaram2018-07-253-5/+9
* 4410Kartik Agaram2018-07-251-145/+0
* 4409Kartik Agaram2018-07-253-15/+41
* 4407 - error message on unimplemented syscallsKartik Agaram2018-07-251-0/+2
* 4403Kartik Agaram2018-07-251-0/+2
* 4400 - fix a couple of warningsKartik Agaram2018-07-252-3/+2
* 4398Kartik Agaram2018-07-241-1/+1
* 4397 - temporarily revert syntax checksKartik Agaram2018-07-242-587/+61
* 4396Kartik Agaram2018-07-244-4/+22
* 4395Kartik Agaram2018-07-244-10/+64
* 4394Kartik Agaram2018-07-241-2/+2
* 4393 - undo 4362Kartik Agaram2018-07-241-1/+0
* 4392Kartik Agaram2018-07-244-0/+16
* 4391 - checks for modrm-based instructionsKartik Agaram2018-07-232-62/+146
* 4390 - check for instruction operand overflowKartik Agaram2018-07-233-13/+111
* 4389Kartik Agaram2018-07-231-0/+0
* 4387Kartik Agaram2018-07-221-1/+8
* 4386 - start of syntax-checkingKartik Agaram2018-07-222-1/+322
* 4385 - online help on addressing modesKartik Agaram2018-07-212-1/+87
* 4384 - opcodes all documentedKartik Agaram2018-07-201-0/+18
* 4383Kartik Agaram2018-07-202-23/+34
* 4382Kartik Agaram2018-07-201-0/+5
* 4381Kartik Agaram2018-07-202-2/+3
* 4380 - single-byte opcodes all documentedKartik Agaram2018-07-203-3/+12
* 4379Kartik Agaram2018-07-201-1/+1
n class="p">, "foobar"); } void test_trace_check_always_finds_empty_lines2() { CHECK_TRACE_CONTENTS("test layer 1", ""); } void test_trace_orders_across_layers() { trace("test layer 1") << "foo"; trace("test layer 2") << "bar"; trace("test layer 1") << "qux"; CHECK_TRACE_CONTENTS("", "foobarqux"); } void test_trace_orders_across_layers2() { trace("test layer 1") << "foo"; trace("test layer 2") << "bar"; trace("test layer 1") << "qux"; CHECK_TRACE_CONTENTS("foobarqux"); } void test_trace_checks_ordering_spanning_multiple_layers() { trace("layer1") << "foo"; trace("layer2") << "bar"; trace("layer1") << "qux"; CHECK_TRACE_CONTENTS("layer1: foolayer2: barlayer1: qux"); } void test_trace_segments_within_layers() { trace("test layer 1") << "foo"; trace("test layer 2") << "bar"; new_trace_frame("test layer 1"); trace("test layer 1") << "qux"; CHECK_TRACE_CONTENTS("test layer 1", "fooqux"); CHECK_TRACE_CONTENTS("test layer 1", 0, "foo"); CHECK_TRACE_DOESNT_CONTAIN("test layer 1", 1, "foo"); } void test_trace_checks_ordering_across_layers_and_frames() { trace("test layer 1") << "foo"; trace("test layer 2") << "bar"; new_trace_frame("test layer 1"); trace("test layer 1") << "qux"; CHECK_TRACE_CONTENTS("test layer 1/0: footest layer 2: bartest layer 1: qux"); CHECK_TRACE_CONTENTS("test layer 1: footest layer 2: bartest layer 1/1: qux"); } void trace_test_fn(int n) { if (n == 0) return; new_trace_frame("foo"); trace("foo") << "before: " << n; trace_test_fn(n-1); trace("foo") << "after: " << n; } void test_trace_keeps_level_together() { CHECK_TRACE_CONTENTS("foo", ""); trace_test_fn(4); CHECK_TRACE_CONTENTS("foo", 2, "before: 3after: 3"); } void test_trace_supports_multiple_layers() { trace("test layer 1") << "foo"; trace("test layer 2") << "bar"; trace("test layer 1") << "qux"; CHECK_TRACE_CONTENTS("test layer 1,test layer 2", "foobarqux"); } void test_trace_supports_hierarchical_layers() { trace("test layer/a") << "foo"; trace("different layer/c") << "foo 2"; trace("test layer/b") << "bar"; CHECK_TRACE_CONTENTS("test layer/", "foobar"); } void test_trace_supports_count() { trace("test layer 1") << "foo"; trace("test layer 1") << "foo"; CHECK_EQ(trace_count("test layer 1", "foo"), 2); } void test_trace_supports_count2() { trace("test layer 1") << "foo"; trace("test layer 1") << "bar"; CHECK_EQ(trace_count("test layer 1"), 2); } // pending: DUMP tests // pending: readable_contents() adds newline if necessary. // pending: RAISE also prints to stderr. // pending: RAISE doesn't print to stderr if Hide_warnings is set. // pending: RAISE doesn't have to be saved if Hide_warnings is set, just printed. // pending: RAISE prints to stderr if Trace_stream is NULL. // pending: RAISE prints to stderr if Trace_stream is NULL even if Hide_warnings is set. // pending: RAISE << ... die() doesn't die if Hide_warnings is set. // can't check trace because trace methods call 'split' void test_split_returns_at_least_one_elem() { vector<string> result = split("", ","); CHECK_EQ(result.size(), 1); CHECK_EQ(result[0], ""); } void test_split_returns_entire_input_when_no_delim() { vector<string> result = split("abc", ","); CHECK_EQ(result.size(), 1); CHECK_EQ(result[0], "abc"); } void test_split_works() { vector<string> result = split("abc,def", ","); CHECK_EQ(result.size(), 2); CHECK_EQ(result[0], "abc"); CHECK_EQ(result[1], "def"); } void test_split_works2() { vector<string> result = split("abc,def,ghi", ","); CHECK_EQ(result.size(), 3); CHECK_EQ(result[0], "abc"); CHECK_EQ(result[1], "def"); CHECK_EQ(result[2], "ghi"); } void test_split_handles_multichar_delim() { vector<string> result = split("abc,,def,,ghi", ",,"); CHECK_EQ(result.size(), 3); CHECK_EQ(result[0], "abc"); CHECK_EQ(result[1], "def"); CHECK_EQ(result[2], "ghi"); }