diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2017-11-13 01:00:33 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2017-11-13 01:01:34 -0500 |
| commit | 5cc96a0fb06fa7d86563f4cb64e5fa9d4f6a09f9 (patch) | |
| tree | 40052668ffe030452b45e3a2d6be8d8fc24acdee /tests/test_ports.py | |
| parent | 6a635660bd7b47238642d4a552782687352555ac (diff) | |
Big-ass coding binge presents: a Lisp.
This implements a continuation-passing interpreter, which means we get tail calls ferfree. I stopped short of implementing call/cc, because I don't think we need it, but we can get there if we have to.
Diffstat (limited to 'tests/test_ports.py')
| -rw-r--r-- | tests/test_ports.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_ports.py b/tests/test_ports.py index c2d1e06..d755dcf 100644 --- a/tests/test_ports.py +++ b/tests/test_ports.py @@ -6,24 +6,24 @@ from actinide.ports import * @given(text(), integers(min_value=1, max_value=2**32 - 1)) def test_read(input, n): port = string_to_input_port(input) - output = read(port, n) + output = read_port(port, n) assert input.startswith(output) assert (len(output) == 0 and len(input) == 0) != (0 < len(output) <= n) - assert output + read_fully(port) == input + assert output + read_port_fully(port) == input @given(text(), integers(min_value=1, max_value=2**32 - 1)) def test_peek(input, n): port = string_to_input_port(input) - output = peek(port, n) + output = peek_port(port, n) assert input.startswith(output) assert (len(output) == 0 and len(input) == 0) != (0 < len(output) <= n) - assert read_fully(port) == input + assert read_port_fully(port) == input @given(text(), integers(min_value=1, max_value=2**32 - 1)) def test_read_fully(input, n): port = string_to_input_port(input) - output = read_fully(port) + output = read_port_fully(port) assert output == input |
