Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct read_word test #85

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions assignments/1_io_library/stud/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def perform(self, arg):
mov rax, 60
xor rdi, rdi
syscall""",
lambda i, o, r: first_or_empty(i) == o),
lambda i, o, r: i == o),

Test('read_word_length',
lambda v:"""
Expand All @@ -295,7 +295,7 @@ def perform(self, arg):
mov rax, 60
mov rdi, rdx
syscall""",
lambda i, o, r: len(first_or_empty(i)) == r or len(first_or_empty(i)) > 19),
lambda i, o, r: len(i) == r or len(i) > 19),

Test('read_word_too_long',
lambda v:"""
Expand All @@ -314,7 +314,7 @@ def perform(self, arg):
mov rdi, rax
mov rax, 60
syscall""",
lambda i, o, r: ( (not len(first_or_empty(i)) > 19) and r != 0 ) or r == 0 ),
lambda i, o, r: ( (not len(i) > 19) and r != 0 ) or r == 0 ),

Test('parse_uint',
lambda v: """section .data
Expand Down Expand Up @@ -440,7 +440,7 @@ def perform(self, arg):
'read_char'
: ['-1', '-1234asdasd5234121', '', ' ', '\t ', 'hey ya ye ya', 'hello world' ],
'read_word'
: ['-1'], # , '-1234asdasd5234121', '', ' ', '\t ', 'hey ya ye ya', 'hello world' ],
: ['-1', '-1234asdasd5234121', '', ' ', '\t ', 'hey ya ye ya', 'hello world' ],
'read_word_length'
: ['-1', '-1234asdasd5234121', '', ' ', '\t ', 'hey ya ye ya', 'hello world' ],
'read_word_too_long'
Expand Down