NAME
Parrot::Test - Parrot Test
SYNOPSIS
Set the number of tests to be run like this:
use Parrot::Test tests => 8;
Write individual tests like this:
output_is(<<'CODE', <<'OUTPUT', "description of test");
...
CODE
...
OUTPUT
DESCRIPTION
This module provides various Parrot-specific test functions.
Functions
In the following functions $description
should describe the test.
output_is($code, $expected, $description)
-
Runs the PASM code and passes the test if a string comparison of output with the expected result it true.
output_like($code, $expected, $description)
-
Runs the PASM code and passes the test if output matches the expected result.
output_isnt($code, $expected, $description)
-
Runs the PASM code and passes the test if a string comparison of output with the expected result it false.
pir_output_is($code, $expected, $description)
-
Runs the PIR code and passes the test if a string comparison of output with the expected result it true.
pir_output_like($code, $expected, $description)
-
Runs the PIR code and passes the test if output matches the expected result.
pir_output_isnt($code, $expected, $description)
-
Runs the PIR code and passes the test if a string comparison of output with the expected result it false.
c_output_is($code, $expected, $description)
-
Compiles and runs the C code, passing the test if a string comparison of output with the expected result it true.
c_output_like($code, $expected, $description)
-
Compiles and runs the C code, passing the test if output matches the expected result.
c_output_isnt($code, $expected, $description)
-
Compiles and runs the C code, passing the test if a string comparison of output with the expected result it false.
skip($why, $how_many)
-
Use within a
SKIP: { ... }
block to indicate why and how many test are being skipped.