Record
Check if a record is a subtype
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “B”.
Examples
predicate |
---|
boolean? |
bytevector? |
char? |
eof-object? |
null? |
number? |
pair? |
port? |
procedure? |
string? |
symbol? |
vector? |
Record with no field
Define a record type
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the exit status should be 0.
Make a record
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the exit status should be 0.
Check a record type
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Record with fields
Define a record type
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the exit status should be 0.
Make a record
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the exit status should be 0.
Check a record type
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “A”.
Get a field
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “AB”.
Set a field
Given a file named “main.scm” with:
When I successfully run scheme main.scm
Then the stdout should contain exactly “AX”.