diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c0f1c36 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Michał Taszycki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.markdown b/README.markdown new file mode 100644 index 0000000..c388928 --- /dev/null +++ b/README.markdown @@ -0,0 +1,85 @@ +# 64spec + +6502/Commodore64 Testing Framework for KickAssembler + +## Installation + +### Recommended way + +1. Create a dir for libraries that your KickAssembler projects use. +2. Get the current version of the 64spec.asm file and put it in this dir along with other libraries. +3. Import it in your spec files as .import source "64spec.asm" +4. Make sure to pass option -libdir when compiling with KickAssembler. + +### If you just want to try it out + +1. Get the current version of the 64spec.asm file and put it in the same directory as your spec files. +2. Import it in your spec files as .import source "64spec.asm" + +## Quick Start + +#### 1. Create file example_spec.asm + +``` asm +.import source "64spec.asm" + +sfspec: :init_spec() + + // TODO: Add assertions here + + :finish_spec() +``` + +![Empty Spec](docs/qs01-empty.png?raw=true "Empty Spec") + +#### 2. Add first failing assertion. + +``` asm +.import source "64spec.asm" + +sfspec: :init_spec() + + :assert_a_equal #42 + + :finish_spec() +``` + +![Empty Spec](docs/qs02-fail.png?raw=true "Empty Spec") + +3. Make it pass + +``` asm +.import source "64spec.asm" + +sfspec: :init_spec() + + lda #42 + :assert_a_equal #42 + + :finish_spec() +``` + +![Empty Spec](docs/qs03-pass.png?raw=true "Empty Spec") + +## License +The MIT License (MIT) + +Copyright (c) 2015 Michał Taszycki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/qs01-empty.png b/docs/qs01-empty.png new file mode 100644 index 0000000..d5964c1 Binary files /dev/null and b/docs/qs01-empty.png differ diff --git a/docs/qs02-fail.png b/docs/qs02-fail.png new file mode 100644 index 0000000..89a93bf Binary files /dev/null and b/docs/qs02-fail.png differ diff --git a/docs/qs03-pass.png b/docs/qs03-pass.png new file mode 100644 index 0000000..b1afad7 Binary files /dev/null and b/docs/qs03-pass.png differ diff --git a/examples/qs01-empty_spec.asm b/examples/qs01-empty_spec.asm new file mode 100644 index 0000000..dbd82b8 --- /dev/null +++ b/examples/qs01-empty_spec.asm @@ -0,0 +1,7 @@ +.import source "64spec.asm" + +sfspec: :init_spec() + + // TODO: Add assertions here + + :finish_spec() diff --git a/examples/qs02-failing_spec.asm b/examples/qs02-failing_spec.asm new file mode 100644 index 0000000..5f64271 --- /dev/null +++ b/examples/qs02-failing_spec.asm @@ -0,0 +1,7 @@ +.import source "64spec.asm" + +sfspec: :init_spec() + + :assert_a_equal #42 + + :finish_spec() diff --git a/examples/qs03-passing_spec.asm b/examples/qs03-passing_spec.asm new file mode 100644 index 0000000..0fcc753 --- /dev/null +++ b/examples/qs03-passing_spec.asm @@ -0,0 +1,8 @@ +.import source "64spec.asm" + +sfspec: :init_spec() + + lda #42 + :assert_a_equal #42 + + :finish_spec() diff --git a/lib/64spec.asm b/lib/64spec.asm index 86c78c7..4df5608 100644 --- a/lib/64spec.asm +++ b/lib/64spec.asm @@ -1,4 +1,27 @@ .importonce + +// The MIT License (MIT) +// +// Copyright (c) 2015 Michał Taszycki +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + .const _64SPEC_VERSION_MAJOR = 0 .const _64SPEC_VERSION_MINOR = 5 .const _64SPEC_VERSION_PATCH = 0