Forked from devyn/the-specification-namespace.md
Last active
August 29, 2015 14:03
-
-
Save ELLIOTTCABLE/a4bbf93dd4c1a00cb835 to your computer and use it in GitHub Desktop.
exploring language-specs for Paws.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The Rulebook, or Paws-language spec-suite, is written as a series of files like the following. | |
# Each file is a YAML file encoding a set of tests. This file can be consumed as-is (if you have a | |
# YAML parser handy), compiled into a single Paws-source-code test file (see below), or into | |
# a directory of individual plain Paws files for each test. | |
# | |
# (Eventually / ideally, an automated test-runner provided with the Rulebook will take your | |
# implementation's binary, compile these tests to individual files, and then verify that your | |
# implementation-in-progress succeeds on each test, individually.) | |
Combinations against infrastructure: | |
- name: "combination of the 'infrastructure' key against the default-receiver will result" | |
body: | | |
infrastructure; | |
pass[]; | |
eventually: fail | |
- name: "combination of a non-existent key against the default-receiver will not result" | |
body: | | |
jabberwocky; | |
fail[]; | |
eventually: pass | |
- name: "combination of a known `label`-y key with the infrastructure-receiver will result" | |
body: | | |
infrastructure empty; | |
pass[]; | |
eventually: fail | |
- name: "result of combining a known key against infrastructure results when combined" | |
note: > | |
This implies the result is an execution, because there would be no lookup-match for the | |
current execution on any resultant object. An *execution* on the other hand, might accept the | |
caller, and result. | |
body: | | |
infrastructure empty[]; | |
pass[]; | |
eventually: fail |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spec test[] "combination of the 'infrastructure' key against the default-receiver will result" { | |
infrastructure; | |
pass[]; | |
} eventually { fail[] }; | |
spec test[] "combination of a non-existent key against the default-receiver will not result" { | |
jabberwocky; | |
fail[]; | |
} eventually { pass[] }; | |
spec test[] "combination of a known `label`-y key with the infrastructure-receiver will result" { | |
infrastructure empty; | |
pass[]; | |
} eventually { fail[] }; | |
"This implies the result is an execution, because there would be no lookup-match for the current | |
execution on any resultant object. An *execution* on the other hand, might accept the caller, and | |
result." | |
spec test[] "result of combining a known key against infrastructure results when combined" { | |
infrastructure empty[]; | |
pass[]; | |
} eventually { fail[] }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment