mirror of
https://github.com/PeterCamilleri/fOOrth
synced 2024-11-16 07:47:56 +01:00
More var name refactoring.
This commit is contained in:
parent
fb358194f0
commit
aa16e7a259
1 changed files with 5 additions and 5 deletions
|
@ -73,18 +73,18 @@ module XfOOrthTestExtensions
|
|||
#When the source is executed, does the stdout match?
|
||||
#<br>Parameters:
|
||||
#* source - A string containing fOOrth source code to execute.
|
||||
#* stdout_output - A string with the expected console output.
|
||||
def foorth_output(source, stdout_output)
|
||||
#* expected - A string with the expected console output.
|
||||
def foorth_output(source, expected)
|
||||
self._assertions += 1
|
||||
failed, msg = false, ""
|
||||
vm = Thread.current[:vm]
|
||||
|
||||
out, _nc = capture_io do
|
||||
actual, _nc = capture_io do
|
||||
vm.process_string(source)
|
||||
end
|
||||
|
||||
if stdout_output != out
|
||||
msg = "Expected: #{stdout_output.inspect}\nActual: #{out.inspect}"
|
||||
if expected != actual
|
||||
msg = "Expected: #{expected.inspect}\nActual: #{actual.inspect}"
|
||||
raise MiniTest::Assertion, msg, caller
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue