From 4e7849f129b5523d119ec3ca4d40ff0ff2af0810 Mon Sep 17 00:00:00 2001 From: SimaDovakin Date: Sat, 5 Oct 2024 13:55:23 +0300 Subject: [PATCH] The Unison upgrade - Changed tests and test loaders. - Edited some example solutions. - Edited some track docs. --- docs/INSTALLATION.md | 2 +- docs/LEARNING.md | 2 +- docs/RESOURCES.md | 6 +- docs/TESTS.md | 22 +- docs/WORKFLOW.md | 4 + .../concept/lasagna/.meta/testAnnotation.json | 8 +- exercises/concept/lasagna/.meta/testLoader.md | 10 +- .../pacman-rules/.meta/testAnnotation.json | 50 +-- .../concept/pacman-rules/.meta/testLoader.md | 10 +- .../concept/pacman-rules/pacmanRules.test.u | 24 +- .../acronym/.meta/testAnnotation.json | 74 ++--- .../practice/acronym/.meta/testLoader.md | 10 +- .../all-your-base/.meta/testAnnotation.json | 86 ++--- .../all-your-base/.meta/testLoader.md | 10 +- .../practice/all-your-base/allYourBase.test.u | 42 +-- .../allergies/.meta/testAnnotation.json | 202 +++++------ .../practice/allergies/.meta/testLoader.md | 10 +- exercises/practice/allergies/allergies.test.u | 100 +++--- .../anagram/.meta/testAnnotation.json | 34 +- .../practice/anagram/.meta/testLoader.md | 10 +- exercises/practice/anagram/anagram.test.u | 32 +- .../.meta/testAnnotation.json | 38 +-- .../armstrong-numbers/.meta/testLoader.md | 10 +- .../armstrong-numbers/armstrongNumbers.test.u | 18 +- .../binary-search/.meta/testAnnotation.json | 46 +-- .../binary-search/.meta/testLoader.md | 10 +- .../binary-search/binarySearch.test.u | 22 +- .../practice/bob/.meta/testAnnotation.json | 102 +++--- exercises/practice/bob/.meta/testLoader.md | 10 +- exercises/practice/bob/bob.test.u | 50 +-- .../bowling/.meta/examples/bowling.example.u | 12 +- .../bowling/.meta/testAnnotation.json | 86 ++--- .../practice/bowling/.meta/testLoader.md | 10 +- exercises/practice/bowling/bowling.test.u | 42 +-- .../practice/change/.meta/testAnnotation.json | 46 +-- exercises/practice/change/.meta/testLoader.md | 10 +- exercises/practice/change/change.test.u | 22 +- .../practice/clock/.meta/testAnnotation.json | 313 ++++++++++++------ exercises/practice/clock/.meta/testLoader.md | 10 +- exercises/practice/clock/clock.test.u | 104 +++--- .../.meta/testAnnotation.json | 22 +- .../collatz-conjecture/.meta/testLoader.md | 10 +- .../collatz-conjecture/collatz.test.u | 10 +- .../crypto-square/.meta/testAnnotation.json | 30 +- .../crypto-square/.meta/testLoader.md | 10 +- .../practice/crypto-square/crypto.test.u | 14 +- .../practice/darts/.meta/testAnnotation.json | 52 +-- exercises/practice/darts/.meta/testLoader.md | 10 +- exercises/practice/darts/darts.test.u | 26 +- .../diamond/.meta/testAnnotation.json | 22 +- .../practice/diamond/.meta/testLoader.md | 10 +- exercises/practice/diamond/diamond.test.u | 10 +- .../.meta/testAnnotation.json | 38 +-- .../difference-of-squares/.meta/testLoader.md | 10 +- .../differenceOfSquares.test.u | 18 +- .../dnd-character/.meta/testAnnotation.json | 74 ++--- .../dnd-character/.meta/testLoader.md | 10 +- .../dnd-character/dndCharacter.test.u | 38 ++- .../practice/etl/.meta/testAnnotation.json | 18 +- exercises/practice/etl/.meta/testLoader.md | 10 +- exercises/practice/etl/etl.test.u | 8 +- .../hello-world/.meta/testAnnotation.json | 6 +- .../practice/hello-world/.meta/testLoader.md | 10 +- .../isogram/.meta/testAnnotation.json | 58 ++-- .../practice/isogram/.meta/testLoader.md | 10 +- exercises/practice/isogram/isogram.test.u | 28 +- .../.meta/testAnnotation.json | 68 ++-- .../kindergarten-garden/.meta/testLoader.md | 10 +- .../kindergartenGarden.test.u | 34 +- .../knapsack/.meta/testAnnotation.json | 30 +- .../practice/knapsack/.meta/testLoader.md | 10 +- exercises/practice/knapsack/knapsack.test.u | 14 +- .../.meta/testAnnotation.json | 62 ++-- .../.meta/testLoader.md | 10 +- .../largestSeriesProduct.test.u | 32 +- .../practice/leap/.meta/testAnnotation.json | 38 +-- exercises/practice/leap/.meta/testLoader.md | 10 +- exercises/practice/leap/leap.test.u | 18 +- .../list-ops/.meta/testAnnotation.json | 90 ++--- .../practice/list-ops/.meta/testLoader.md | 10 +- exercises/practice/list-ops/listOps.test.u | 44 +-- .../practice/luhn/.meta/testAnnotation.json | 90 ++--- exercises/practice/luhn/.meta/testLoader.md | 10 +- exercises/practice/luhn/luhn.test.u | 44 +-- .../.meta/examples/majorityElement.example.u | 2 +- .../.meta/testAnnotation.json | 24 +- .../majority-element/.meta/testLoader.md | 10 +- .../majority-element/majorityElement.test.u | 12 +- .../majority-element/majorityElement.u | 2 +- .../.meta/examples/matchingBrackets.example.u | 4 +- .../.meta/testAnnotation.json | 78 ++--- .../matching-brackets/.meta/testLoader.md | 10 +- .../matching-brackets/matchingBrackets.test.u | 38 +-- .../.meta/examples/minesweeper.example.u | 10 +- .../minesweeper/.meta/testAnnotation.json | 48 +-- .../practice/minesweeper/.meta/testLoader.md | 10 +- .../practice/minesweeper/minesweeper.test.u | 24 +- .../.meta/testAnnotation.json | 22 +- .../nucleotide-count/.meta/testLoader.md | 10 +- .../nucleotide-count/nucleotideCount.test.u | 10 +- .../pangram/.meta/testAnnotation.json | 40 +-- .../practice/pangram/.meta/testLoader.md | 10 +- exercises/practice/pangram/pangram.test.u | 20 +- .../pig-latin/.meta/testAnnotation.json | 88 ++--- .../practice/pig-latin/.meta/testLoader.md | 10 +- exercises/practice/pig-latin/pigLatin.test.u | 44 +-- .../.meta/testAnnotation.json | 106 +++--- .../protein-translation/.meta/testLoader.md | 10 +- .../proteinTranslation.test.u | 52 +-- .../queen-attack/.meta/testAnnotation.json | 46 +-- .../practice/queen-attack/.meta/testLoader.md | 10 +- exercises/practice/queen-attack/queen.test.u | 22 +- .../raindrops/.meta/testAnnotation.json | 74 ++--- .../practice/raindrops/.meta/testLoader.md | 10 +- exercises/practice/raindrops/raindrops.test.u | 36 +- .../reverse-string/.meta/testAnnotation.json | 26 +- .../reverse-string/.meta/testLoader.md | 10 +- .../reverse-string/reverseString.test.u | 12 +- .../.meta/testAnnotation.json | 30 +- .../rna-transcription/.meta/testLoader.md | 10 +- .../practice/rna-transcription/rna.test.u | 14 +- .../roman-numerals/.meta/testAnnotation.json | 106 +++--- .../roman-numerals/.meta/testLoader.md | 10 +- .../roman-numerals/romanNumerals.test.u | 52 +-- .../.meta/testAnnotation.json | 40 +-- .../rotational-cipher/.meta/testLoader.md | 10 +- .../rotational-cipher/rotationalCipher.test.u | 20 +- .../.meta/testAnnotation.json | 54 +-- .../run-length-encoding/.meta/testLoader.md | 10 +- .../run-length-encoding/runLength.test.u | 26 +- .../.meta/examples/scaleGenerator.example.u | 6 +- .../scale-generator/.meta/testAnnotation.json | 130 ++++---- .../scale-generator/.meta/testLoader.md | 10 +- .../scale-generator/scaleGenerator.test.u | 64 ++-- .../scrabble-score/.meta/testAnnotation.json | 46 +-- .../scrabble-score/.meta/testLoader.md | 10 +- .../scrabble-score/scrabbleScore.test.u | 22 +- .../.meta/testAnnotation.json | 44 +-- .../secret-handshake/.meta/testLoader.md | 10 +- .../secret-handshake/secretHandshake.test.u | 22 +- .../sieve/.meta/examples/sieve.example.u | 8 +- .../practice/sieve/.meta/testAnnotation.json | 20 +- exercises/practice/sieve/.meta/testLoader.md | 10 +- exercises/practice/sieve/sieve.test.u | 10 +- .../.meta/examples/simpleLinkedList.example.u | 14 +- .../.meta/testAnnotation.json | 30 +- .../simple-linked-list/.meta/testLoader.md | 10 +- .../simpleLinkedList.test.u | 16 +- .../space-age/.meta/testAnnotation.json | 38 +-- .../practice/space-age/.meta/testLoader.md | 10 +- exercises/practice/space-age/spaceAge.test.u | 18 +- .../spiral-matrix/.meta/testAnnotation.json | 26 +- .../spiral-matrix/.meta/testLoader.md | 10 +- .../spiral-matrix/spiralMatrix.test.u | 12 +- .../.meta/examples/streamOps.example.u | 4 +- .../stream-ops/.meta/testAnnotation.json | 34 +- .../practice/stream-ops/.meta/testLoader.md | 10 +- .../practice/stream-ops/streamOps.test.u | 16 +- .../sublist/.meta/testAnnotation.json | 74 ++--- .../practice/sublist/.meta/testLoader.md | 10 +- exercises/practice/sublist/sublist.test.u | 36 +- .../.meta/testAnnotation.json | 66 ++-- .../sum-of-multiples/.meta/testLoader.md | 10 +- .../sum-of-multiples/sumOfMultiples.test.u | 32 +- .../practice/yacht/.meta/testAnnotation.json | 116 +++---- exercises/practice/yacht/.meta/testLoader.md | 10 +- exercises/practice/yacht/yacht.test.u | 58 ++-- .../.meta/examples/zebraPuzzle.example.u | 20 +- .../zebra-puzzle/.meta/testAnnotation.json | 9 +- .../practice/zebra-puzzle/.meta/testLoader.md | 10 +- .../practice/zebra-puzzle/zebraPuzzle.test.u | 4 +- .../practice/zipper/.meta/testAnnotation.json | 50 +-- exercises/practice/zipper/.meta/testLoader.md | 10 +- exercises/practice/zipper/zipper.test.u | 46 +-- 174 files changed, 2776 insertions(+), 2662 deletions(-) diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index 65332a7..7216f34 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -2,7 +2,7 @@ ## Installation Options -The current Unison release is available for Mac OS X, 64-bit Linux, and Windows users! We hope that if you are trying out Unison you'll come talk to us in the Exercism forum or in the [Unison language slack](http://unison-lang.org/slack). Come ask questions, and report issues you might encounter! We want you to have a welcoming and positive experience when getting started! 😊 +The current Unison release is available for Mac OS X, 64-bit Linux, and Windows users! We hope that if you are trying out Unison you'll come talk to us in the Exercism forum or in the [Unison Discord](https://unison-lang.org/discord). Come ask questions, and report issues you might encounter! We want you to have a welcoming and positive experience when getting started! 😊 Unison can be downloaded with [homebrew](https://brew.sh/), [Nix](https://github.com/ceedubs/unison-nix/#usage), or directly via packaged binaries. All of these download options are described in the [Installation instructions page of our website](https://www.unison-lang.org/learn/quickstart/#installation-options). Once you have the UCM installed, head back here! diff --git a/docs/LEARNING.md b/docs/LEARNING.md index 59a76cd..759914f 100644 --- a/docs/LEARNING.md +++ b/docs/LEARNING.md @@ -8,4 +8,4 @@ For reference material, the [Unison language reference](https://www.unison-lang. You may want to familiarize yourself with [Unison Share](https://share.unison-lang.org/), Unison's repository for public libraries and projects. The documentation for the standard library, [`base`](https://share.unison-lang.org/@unison/code/latest/namespaces/public/base/latest), contains helpful usage information. -👋 If you're ever stuck, we're happy to help. The #beginner-friendly channel in [the official Unison slack](http://unison-lang.org/slack) is filled with friendly people. +👋 If you're ever stuck, we're happy to help. The #beginner-friendly channel in [the official Unison Discord server](https://unison-lang.org/discord) is filled with friendly people. diff --git a/docs/RESOURCES.md b/docs/RESOURCES.md index e9b869e..2cdc614 100644 --- a/docs/RESOURCES.md +++ b/docs/RESOURCES.md @@ -4,13 +4,13 @@ * [The Unison language documentation](https://www.unison-lang.org/learn/fundamentals/values-and-functions/terms/) is a great place to learn core Unison concepts * [Unison Share](https://share.unison-lang.org/) is the repository where we host public libraries and code -* You can always ask questions in [the Unison slack](http://unison-lang.org/slack) +* You can always ask questions in [the Unison Discord](https://unison-lang.org/discord) * [The Unison Blog](https://www.unison-lang.org/blog/) contains language updates and special topics * An article about using [Unison's Remote ability to implement a Spark-like library](https://www.unison-lang.org/articles/distributed-datasets/) ## Videos -* [YOW! Lambda Jam 2021](https://www.youtube.com/watch?v=DF6zt0Q-pz4), by RĂșnar Bjarnason +* [YOW! Lambda Jam 2021 - Part 1](https://www.youtube.com/watch?v=Adu75GJ0w1o), and [Part 2](https://www.youtube.com/watch?v=gy44CTCce0o), by RĂșnar Bjarnason * [Scale By the Bay 2019](https://www.youtube.com/watch?v=IvENPX0MAZ4), by Paul Chiusano * This is a 32 minute talk that briefly covers the core ideas of Unison and talks about Unison's approach to refactoring. * [Strange Loop 2019](https://www.youtube.com/watch?v=gCWtkvDQ2ZI), by Paul Chiusano @@ -18,4 +18,4 @@ * [Scale By the Bay 2018](https://www.youtube.com/watch?v=v7L-5AQQkbM), by Paul Chiusano. * [Lambda World 2018](https://www.youtube.com/watch?v=rp_Eild1aq8), by RĂșnar Bjarnason also presented at [Øredev 2018](https://vimeo.com/311512465). * [Scala World 2017](https://www.youtube.com/watch?v=knqlWboqf_U), by Paul Chiusano. -* [Full Stack Fest](https://www.youtube.com/watch?v=f6yA3t0dO-k) 2016, by Paul Chiusano \ No newline at end of file +* [Full Stack Fest](https://www.youtube.com/watch?v=f6yA3t0dO-k) 2016, by Paul Chiusano diff --git a/docs/TESTS.md b/docs/TESTS.md index 4083d40..7ce7ef2 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -8,7 +8,7 @@ Writing Unison code is as simple as opening your terminal of choice and running the `ucm` command in the directory where you'll be writing your Unison code. Then you can use your favorite text editor to create or open a file with a `.u` suffix, like `scratch.u` or `hello.u`. The bulk of your workflow will be navigating between the running `ucm` command line instance and your `.u` file. The UCM automatically listens to changes in your `.u` suffixed file upon saving the file. - In lieu of a directory structure, Unison codebases are organized via "namespaces". You'll be exploring the standard library's namespace, called `base`, for useful functions and data types, and you'll be creating your own as you write Unison code. In the UCM, navigation in the codebase is done with the [`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls), [`cd`](https://www.unison-lang.org/learn/ucm-commands/#cd), and [`view`](https://www.unison-lang.org/learn/ucm-commands/#view) commands—they're used for listing namespace content, moving throughout the namespace tree, and viewing source code, respectively. + In lieu of a directory structure, Unison codebases are organized via "namespaces". You'll be exploring the standard library's namespace, called `base`, for useful functions and data types, and you'll be creating your own as you write Unison code. In the UCM, navigation in the codebase is done with the [`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls) and [`view`](https://www.unison-lang.org/learn/ucm-commands/#view) commands—they're used for listing namespace content and viewing source code, respectively. While you can navigate and view your codebase via the UCM CLI, you may also want to see a nice graphical representation of your work. You can do that by issuing the [`ui`](https://www.unison-lang.org/learn/ucm-commands/#ui) command in the UCM CLI. It will open a browser window with a view of the code in your codebase. The local codebase UI is also a great way to explore functions in our standard library, called `base`, which might be useful in accomplishing the exercises. [Read more about the local codebase UI here](https://www.unison-lang.org/learn/tooling/local-codebase-u-i/). @@ -18,21 +18,22 @@ ### Quick overview - 1. With the UCM watching the exercise directory, make your changes in the `.u` file - 2. Save the `.u` file - 3. If the file typechecks, run the `add` or `update` UCM commands + 1. Create a new project using command [`project.create`](https://www.unison-lang.org/docs/tour/#part-2-tour) and provide the name for it (e.g. `project.create hello-world`) + 2. With the UCM watching the exercise directory, make your changes in the `.u` file + 3. Save the `.u` file + 4. If the file typechecks, run the `add` or `update` UCM commands * If the file does not typecheck, make changes to the code in your `.u` file until it compiles - 4. Run the `load .test.u` command in the UCM cli to bring the tests into scope and run them + 5. Run the `load .test.u` command in the UCM cli to bring the tests into scope and run them ### Detailed walk through - If you're working on an Exercism problem on the command line, most likely you'll be implementing your solution in the directory named after the given exercise. For example, if the exercise is `hello-world`, you should open the `ucm` from the command line after having `cd`'ed into `~/exercism/unison/hello-world`. Make your implementation changes in the `hello.u` file, and when you're satisfied with your implementation, enter the `add` or `update` command in the Unison codebase manager CLI (UCM) to add your work from the file into the codebase. + If you're working on an Exercism problem on the command line, most likely you'll be implementing your solution in the directory named after the given exercise. For example, if the exercise is `hello-world`, you should open the `ucm` from the command line after having `cd`'ed into `~/exercism/unison/hello-world` and create a project in the `ucm` (e.g. `project.create hello-world`). Make your implementation changes in the `hello.u` file, and when you're satisfied with your implementation, enter the `add` or `update` command in the Unison codebase manager CLI (UCM) to add your work from the file into the codebase. - The file that contains the tests for each exercise is suffixed `.test.u`. You'll want to use the `load` command in the UCM to bring the tests into scope and run them. The `load` command takes a file path as its argument. Here's what that might look like for the hello world exercise: + The file that contains the tests for each exercise is suffixed `.test.u`. You'll want to use the `load` command in the UCM to bring the tests into scope and run them. The `load` command takes a file path as its argument. Here's what that might look like for the hello world exercise and `hello-world` project: ``` - .> load hello.test.u + hello-world/main> load hello.test.u ``` You should see a message from the UCM about the terms that were brought into scope and, importantly, the result of running the test: @@ -63,7 +64,7 @@ hello : Text - .> update + hello-world/main> update ⍟ I've updated these names to your new definition: @@ -73,7 +74,7 @@ Next we can re-load our tests to see if anything changed! ``` - .> load hello.test.u + hello-world/main> load hello.test.u Now evaluating any watch expressions (lines starting with `>`)... Ctrl+C cancels. @@ -91,7 +92,6 @@ * If the old definition has any dependents, update will automatically propagate the change if possible, or create a [`todo`](https://www.unison-lang.org/learn/usage-topics/workflow-how-tos/resolve-conflicts/) item for future refactoring. * [`load`](https://www.unison-lang.org/learn/ucm-commands/#load): Parses, typechecks and evaluates the given `.u` suffixed scratch file. Once typechecked and evaluated, you can add the terms to your codebase. * [`ls`](https://www.unison-lang.org/learn/ucm-commands/#ls): Lists the contents of a namespace - * [`cd`](https://www.unison-lang.org/learn/ucm-commands/#cd): Navigates into the given namespace, creating the namespace if it does not exist * [`view`](https://www.unison-lang.org/learn/ucm-commands/#view): View the source code of a given Unison definition * [`ui`](https://www.unison-lang.org/learn/ucm-commands/#ui): Opens the local codebase UI * `exit`: Closes the UCM diff --git a/docs/WORKFLOW.md b/docs/WORKFLOW.md index ac12150..60ae901 100644 --- a/docs/WORKFLOW.md +++ b/docs/WORKFLOW.md @@ -14,6 +14,10 @@ The UCM will show the results of evaluating the expression upon saving the file. For a more in-depth Exercism workflow, here's a [walk-through video][walk-through-vid] of implementing and testing an Exercism problem. +```exercism/caution +The walk-through video shows workflow for the older version of Unison. See new workflow [here](https://exercism.org/docs/tracks/unison/tests) with new project workflow. +``` + ## Codebase organization A Unison codebase is organized by "namespaces." Namespaces function a bit like directories in a file system, except instead of containing files, they contain your Unison types and functions. Namespace paths are separated by dots, `.`. For example, we can refer to the `Text` namespace in the `base` namespace with `base.Text`. diff --git a/exercises/concept/lasagna/.meta/testAnnotation.json b/exercises/concept/lasagna/.meta/testAnnotation.json index 63859dc..d7a5cff 100644 --- a/exercises/concept/lasagna/.meta/testAnnotation.json +++ b/exercises/concept/lasagna/.meta/testAnnotation.json @@ -1,14 +1,14 @@ [ { "name": "lasagna.test.ex1", - "test_code": "lasagna.test.ex1 = test.expect (expectedMinutesInOven === 40)" + "test_code": "let\n Test.expect (expectedMinutesInOven === 40)" }, { "name": "lasagna.test.ex2", - "test_code": "lasagna.test.ex2 = test.expect (preparationTimeInMinutes 5 === 10)" + "test_code": "let\n Test.expect (preparationTimeInMinutes 5 === 10)" }, { "name": "lasagna.test.ex3", - "test_code": "lasagna.test.ex3 = test.expect (elapsedTimeInMinutes 3 20 === 26)" + "test_code": "let\n Test.expect (elapsedTimeInMinutes 3 20 === 26)" } -] +] \ No newline at end of file diff --git a/exercises/concept/lasagna/.meta/testLoader.md b/exercises/concept/lasagna/.meta/testLoader.md index 0e5ed82..d8abc38 100644 --- a/exercises/concept/lasagna/.meta/testLoader.md +++ b/exercises/concept/lasagna/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./lasagna.u -.> add -.> load ./lasagna.test.u -.> add -.> move.term lasagna.tests tests +scratch/main> load ./lasagna.u +scratch/main> add +scratch/main> load ./lasagna.test.u +scratch/main> add +scratch/main> move.term lasagna.tests tests ``` diff --git a/exercises/concept/pacman-rules/.meta/testAnnotation.json b/exercises/concept/pacman-rules/.meta/testAnnotation.json index 7ca9b4f..b676f88 100644 --- a/exercises/concept/pacman-rules/.meta/testAnnotation.json +++ b/exercises/concept/pacman-rules/.meta/testAnnotation.json @@ -1,50 +1,50 @@ [ { - "name": "pacmanRules.test.ex1", - "test_code": "pacmanRules.test.ex1 = let\n\tTest.label \"eatGhost, ghost gets eaten\" <| expect (eatGhost true true)" + "name": "eatGhost, ghost gets eaten", + "test_code": "let\n Test.label.deprecated \"eatGhost, ghost gets eaten\" <| expect (eatGhost true true)" }, { - "name": "pacmanRules.test.ex2", - "test_code": "pacmanRules.test.ex2 = let\n\tTest.label \"eatGhost, ghost does not get eaten because no power pellet active\" <| expect (eatGhost false true === false)" + "name": "eatGhost, ghost does not get eaten because no power pellet active", + "test_code": "let\n Test.label.deprecated \"eatGhost, ghost does not get eaten because no power pellet active\" <| expect (eatGhost false true === false)" }, { - "name": "pacmanRules.test.ex3", - "test_code": "pacmanRules.test.ex3 = let\n\tTest.label \"eatGhost, ghost does not get eaten because not touching ghost\" <| expect (eatGhost true false === false)" + "name": "eatGhost, ghost does not get eaten because not touching ghost", + "test_code": "let\n Test.label.deprecated \"eatGhost, ghost does not get eaten because not touching ghost\" <| expect (eatGhost true false === false)" }, { - "name": "pacmanRules.test.ex4", - "test_code": "pacmanRules.test.ex4 = let\n\tTest.label \"score, score when eating dot\" <| expect (score false true)" + "name": "score, score when eating dot", + "test_code": "let\n Test.label.deprecated \"score, score when eating dot\" <| expect (score false true)" }, { - "name": "pacmanRules.test.ex5", - "test_code": "pacmanRules.test.ex5 = let\n\tTest.label \"score, score when eating power pellet\" <| expect (score true false)" + "name": "score, score when eating power pellet", + "test_code": "let\n Test.label.deprecated \"score, score when eating power pellet\" <| expect (score true false)" }, { - "name": "pacmanRules.test.ex6", - "test_code": "pacmanRules.test.ex6 = let\n\tTest.label \"score, no score when nothing eaten\" <| expect (score false false === false )" + "name": "score, no score when nothing eaten", + "test_code": "let\n Test.label.deprecated \"score, no score when nothing eaten\" <| expect (score false false === false )" }, { - "name": "pacmanRules.test.ex7", - "test_code": "pacmanRules.test.ex7 = let\n\tTest.label \"lose if touching a ghost without a power pellet active\" <| expect (lose false true)" + "name": "lose if touching a ghost without a power pellet active", + "test_code": "let\n Test.label.deprecated \"lose if touching a ghost without a power pellet active\" <| expect (lose false true)" }, { - "name": "pacmanRules.test.ex8", - "test_code": "pacmanRules.test.ex8 = let\n\tTest.label \"don't lose if touching a ghost with a power pellet active\" <| expect (lose true true === false)" + "name": "don't lose if touching a ghost with a power pellet active", + "test_code": "let\n Test.label.deprecated \"don't lose if touching a ghost with a power pellet active\" <| expect (lose true true === false)" }, { - "name": "pacmanRules.test.ex9", - "test_code": "pacmanRules.test.ex9 = let\n\tTest.label \"don't lose if not touching a ghost\" <| expect (lose true false === false)" + "name": "don't lose if not touching a ghost", + "test_code": "let\n Test.label.deprecated \"don't lose if not touching a ghost\" <| expect (lose true false === false)" }, { - "name": "pacmanRules.test.ex10", - "test_code": "pacmanRules.test.ex10 = let\n\tTest.label \"win if all dots eaten\" <| expect (win true false false)" + "name": "win if all dots eaten", + "test_code": "let\n Test.label.deprecated \"win if all dots eaten\" <| expect (win true false false)" }, { - "name": "pacmanRules.test.ex11", - "test_code": "pacmanRules.test.ex11 = let\n\tTest.label \"don't win if all dots eaten, but touching a ghost\" <| expect (win true false true === false)" + "name": "don't win if all dots eaten, but touching a ghost", + "test_code": "let\n Test.label.deprecated \"don't win if all dots eaten, but touching a ghost\" <| expect (win true false true === false)" }, { - "name": "pacmanRules.test.ex12", - "test_code": "pacmanRules.test.ex12 = let\n\tTest.label \"win if all dots eaten and touching a ghost with a power pellet active\" ,| expect (win true true true)" + "name": "win if all dots eaten and touching a ghost with a power pellet active", + "test_code": "let\n Test.label.deprecated \"win if all dots eaten and touching a ghost with a power pellet active\" <| expect (win true true true)" } -] +] \ No newline at end of file diff --git a/exercises/concept/pacman-rules/.meta/testLoader.md b/exercises/concept/pacman-rules/.meta/testLoader.md index 1a44a9f..2b467a9 100644 --- a/exercises/concept/pacman-rules/.meta/testLoader.md +++ b/exercises/concept/pacman-rules/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./pacmanRules.u -.> add -.> load ./pacmanRules.test.u -.> add -.> move.term pacmanRules.tests tests +scratch/main> load ./pacmanRules.u +scratch/main> add +scratch/main> load ./pacmanRules.test.u +scratch/main> add +scratch/main> move.term pacmanRules.tests tests ``` diff --git a/exercises/concept/pacman-rules/pacmanRules.test.u b/exercises/concept/pacman-rules/pacmanRules.test.u index 4b55fff..10481cb 100644 --- a/exercises/concept/pacman-rules/pacmanRules.test.u +++ b/exercises/concept/pacman-rules/pacmanRules.test.u @@ -1,38 +1,38 @@ pacmanRules.test.ex1 = let - Test.label "eatGhost, ghost gets eaten" <| expect (eatGhost true true) + Test.label.deprecated "eatGhost, ghost gets eaten" <| expect (eatGhost true true) pacmanRules.test.ex2 = let - Test.label "eatGhost, ghost does not get eaten because no power pellet active" <| expect (eatGhost false true === false) + Test.label.deprecated "eatGhost, ghost does not get eaten because no power pellet active" <| expect (eatGhost false true === false) pacmanRules.test.ex3 = let - Test.label "eatGhost, ghost does not get eaten because not touching ghost" <| expect (eatGhost true false === false) + Test.label.deprecated "eatGhost, ghost does not get eaten because not touching ghost" <| expect (eatGhost true false === false) pacmanRules.test.ex4 = let - Test.label "score, score when eating dot" <| expect (score false true) + Test.label.deprecated "score, score when eating dot" <| expect (score false true) pacmanRules.test.ex5 = let - Test.label "score, score when eating power pellet" <| expect (score true false) + Test.label.deprecated "score, score when eating power pellet" <| expect (score true false) pacmanRules.test.ex6 = let - Test.label "score, no score when nothing eaten" <| expect (score false false === false ) + Test.label.deprecated "score, no score when nothing eaten" <| expect (score false false === false ) pacmanRules.test.ex7 = let - Test.label "lose if touching a ghost without a power pellet active" <| expect (lose false true) + Test.label.deprecated "lose if touching a ghost without a power pellet active" <| expect (lose false true) pacmanRules.test.ex8 = let - Test.label "don't lose if touching a ghost with a power pellet active" <| expect (lose true true === false) + Test.label.deprecated "don't lose if touching a ghost with a power pellet active" <| expect (lose true true === false) pacmanRules.test.ex9 = let - Test.label "don't lose if not touching a ghost" <| expect (lose true false === false) + Test.label.deprecated "don't lose if not touching a ghost" <| expect (lose true false === false) pacmanRules.test.ex10 = let - Test.label "win if all dots eaten" <| expect (win true false false) + Test.label.deprecated "win if all dots eaten" <| expect (win true false false) pacmanRules.test.ex11 = let - Test.label "don't win if all dots eaten, but touching a ghost" <| expect (win true false true === false) + Test.label.deprecated "don't win if all dots eaten, but touching a ghost" <| expect (win true false true === false) pacmanRules.test.ex12 = let - Test.label "win if all dots eaten and touching a ghost with a power pellet active" <| expect (win true true true) + Test.label.deprecated "win if all dots eaten and touching a ghost with a power pellet active" <| expect (win true true true) test> pacmanRules.tests = runAll [ pacmanRules.test.ex1, diff --git a/exercises/practice/acronym/.meta/testAnnotation.json b/exercises/practice/acronym/.meta/testAnnotation.json index 750d9e9..bc8e952 100644 --- a/exercises/practice/acronym/.meta/testAnnotation.json +++ b/exercises/practice/acronym/.meta/testAnnotation.json @@ -1,38 +1,38 @@ [ - { - "name": "basic", - "test_code": "Test.expect (abbreviate \"Portable Network Graphics\") === \"PNG\"" - }, - { - "name": "lowercase words", - "test_code": "Test.expect (abbreviate \"Ruby on Rails\") === \"ROR\"" - }, - { - "name": "punctuation", - "test_code": "Test.expect (abbreviate \"First In, First Out\") === \"FIFO\"" - }, - { - "name": "all caps word", - "test_code": "Test.expect (abbreviate \"GNU Image Manipulation Program\") === \"GIMP\"" - }, - { - "name": "punctuation without whitespace", - "test_code": "Test.expect (abbreviate \"Complementary metal-oxide semiconductor\") === \"CMOS\"" - }, - { - "name": "very long abbreviation", - "test_code": "Test.expect (abbreviate \"Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me\") === \"ROTFLSHTMDCOALM\"" - }, - { - "name": "consecutive delimiters", - "test_code": "Test.expect (abbreviate \"Something - I made up from thin air\") === \"SIMUFTA\"" - }, - { - "name": "apostrophes", - "test_code": "Test.expect (abbreviate \"Halley's Comet\") === \"HC\"" - }, - { - "name": "underscore emphasis", - "test_code": "Test.expect (abbreviate \"The Road _Not_ Taken\") === \"TRNT\"" - } -] + { + "name": "acronym.test.basic", + "test_code": "Test.expect (abbreviate \"Portable Network Graphics\" === \"PNG\")" + }, + { + "name": "acronym.test.lowercaseWords", + "test_code": "Test.expect (abbreviate \"Ruby on Rails\" === \"ROR\")" + }, + { + "name": "acronym.test.punctuation", + "test_code": "Test.expect (abbreviate \"First In, First Out\" === \"FIFO\")" + }, + { + "name": "acronym.test.allCapsWord", + "test_code": "Test.expect (abbreviate \"GNU Image Manipulation Program\" === \"GIMP\")" + }, + { + "name": "acronym.test.punctuationWithoutWhitespace", + "test_code": "Test.expect (abbreviate \"Complementary metal-oxide semiconductor\" === \"CMOS\")" + }, + { + "name": "acronym.test.veryLongAbbreviation", + "test_code": "Test.expect (abbreviate \"Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me\" === \"ROTFLSHTMDCOALM\")" + }, + { + "name": "acronym.test.consecutiveDelimiters", + "test_code": "Test.expect (abbreviate \"Something - I made up from thin air\" === \"SIMUFTA\")" + }, + { + "name": "acronym.test.apostrophes", + "test_code": "Test.expect (abbreviate \"Halley's Comet\" === \"HC\")" + }, + { + "name": "acronym.test.underscoreEmphasis", + "test_code": "Test.expect (abbreviate \"The Road _Not_ Taken\" === \"TRNT\")" + } +] \ No newline at end of file diff --git a/exercises/practice/acronym/.meta/testLoader.md b/exercises/practice/acronym/.meta/testLoader.md index b011be1..9a40317 100644 --- a/exercises/practice/acronym/.meta/testLoader.md +++ b/exercises/practice/acronym/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./acronym.u -.> add -.> load ./acronym.test.u -.> add -.> move.term acronym.tests tests +scratch/main> load ./acronym.u +scratch/main> add +scratch/main> load ./acronym.test.u +scratch/main> add +scratch/main> move.term acronym.tests tests ``` diff --git a/exercises/practice/all-your-base/.meta/testAnnotation.json b/exercises/practice/all-your-base/.meta/testAnnotation.json index 025b92e..3216a12 100644 --- a/exercises/practice/all-your-base/.meta/testAnnotation.json +++ b/exercises/practice/all-your-base/.meta/testAnnotation.json @@ -1,86 +1,86 @@ [ { - "test_code": "allYourBase.test.ex1 = let\n\tTest.label \"single bit one to decimal\" <| Test.expect (rebase +2 [+1] +10 === Some [+1])", - "name": "allYourBase.test.ex1" + "name": "single bit one to decimal", + "test_code": "let\n Test.label.deprecated \"single bit one to decimal\" <| Test.expect (rebase +2 [+1] +10 === Some [+1])" }, { - "test_code": "allYourBase.test.ex2 = let\n\tTest.label \"binary to single decimal\" <| Test.expect (rebase +2 [+1,+0,+1] +10 === Some [+5])", - "name": "allYourBase.test.ex2" + "name": "binary to single decimal", + "test_code": "let\n Test.label.deprecated \"binary to single decimal\" <| Test.expect (rebase +2 [+1,+0,+1] +10 === Some [+5])" }, { - "test_code": "allYourBase.test.ex3 = let\n\tTest.label \"single decimal to binary\" <| Test.expect (rebase +10 [+5] +2 === Some [+1,+0,+1])", - "name": "allYourBase.test.ex3" + "name": "single decimal to binary", + "test_code": "let\n Test.label.deprecated \"single decimal to binary\" <| Test.expect (rebase +10 [+5] +2 === Some [+1,+0,+1])" }, { - "test_code": "allYourBase.test.ex4 = let\n\tTest.label \"binary to multiple decimal\" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +10 === Some [+4,+2])", - "name": "allYourBase.test.ex4" + "name": "binary to multiple decimal", + "test_code": "let\n Test.label.deprecated \"binary to multiple decimal\" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +10 === Some [+4,+2])" }, { - "test_code": "allYourBase.test.ex5 = let\n\tTest.label \"decimal to binary\" <| Test.expect (rebase +10 [+4,+2] +2 === Some [+1,+0,+1,+0,+1,+0])", - "name": "allYourBase.test.ex5" + "name": "decimal to binary", + "test_code": "let\n Test.label.deprecated \"decimal to binary\" <| Test.expect (rebase +10 [+4,+2] +2 === Some [+1,+0,+1,+0,+1,+0])" }, { - "test_code": "allYourBase.test.ex6 = let\n\tTest.label \"trinary to hexadecimal\" <| Test.expect rebase +3 [+1,+1,+2,+0] +16 === Some [+2,+10])", - "name": "allYourBase.test.ex6" + "name": "trinary to hexadecimal", + "test_code": "let\n Test.label.deprecated \"trinary to hexadecimal\" <| Test.expect (rebase +3 [+1,+1,+2,+0] +16 === Some [+2,+10])" }, { - "test_code": "allYourBase.test.ex7 = let\n\tTest.label \"hexadecimal to trinary\" <| Test.expect (rebase +16 [+2,+10] +3 === Some [+1,+1,+2,+0])", - "name": "allYourBase.test.ex7" + "name": "hexadecimal to trinary", + "test_code": "let\n Test.label.deprecated \"hexadecimal to trinary\" <| Test.expect (rebase +16 [+2,+10] +3 === Some [+1,+1,+2,+0])" }, { - "test_code": "allYourBase.test.ex8 = let\n\tTest.label \"15-bit integer\" <| Test.expect (rebase +97 [+3,+46,+60] +73 === Some [+6,+10,+45])", - "name": "allYourBase.test.ex8" + "name": "15-bit integer", + "test_code": "let\n Test.label.deprecated \"15-bit integer\" <| Test.expect (rebase +97 [+3,+46,+60] +73 === Some [+6,+10,+45])" }, { - "test_code": "allYourBase.test.ex9 = let\n\tTest.label \"empty list\" <| Test.expect (rebase +2 [] +10 === Some [+0])", - "name": "allYourBase.test.ex9" + "name": "empty list", + "test_code": "let\n Test.label.deprecated \"empty list\" <| Test.expect (rebase +2 [] +10 === Some [+0])" }, { - "test_code": "allYourBase.test.ex10 = let\n\tTest.label \"single zero\" <| Test.expect (rebase +10 [+0] +2 === Some [+0])", - "name": "allYourBase.test.ex10" + "name": "single zero", + "test_code": "let\n Test.label.deprecated \"single zero\" <| Test.expect (rebase +10 [+0] +2 === Some [+0])" }, { - "test_code": "allYourBase.test.ex11 = let\n\tTest.label \"multiple zeros\" <| Test.expect (rebase +10 [+0,+0,+0] +2 === Some [+0])", - "name": "allYourBase.test.ex11" + "name": "multiple zeros", + "test_code": "let\n Test.label.deprecated \"multiple zeros\" <| Test.expect (rebase +10 [+0,+0,+0] +2 === Some [+0])" }, { - "test_code": "allYourBase.test.ex12 = let\n\tTest.label \"leading zeros\" <| Test.expect (rebase +7 [+0,+6,+0] +10 === Some [+4,+2])", - "name": "allYourBase.test.ex12" + "name": "leading zeros", + "test_code": "let\n Test.label.deprecated \"leading zeros\" <| Test.expect (rebase +7 [+0,+6,+0] +10 === Some [+4,+2])" }, { - "test_code": "allYourBase.test.ex13 = let\n\tTest.label \"input base is one\" <| Test.expect (rebase +1 [+0] +10 === None)", - "name": "allYourBase.test.ex13" + "name": "input base is one", + "test_code": "let\n Test.label.deprecated \"input base is one\" <| Test.expect (rebase +1 [+0] +10 === None)" }, { - "test_code": "allYourBase.test.ex14 = let\n\tTest.label \"input base is zero\" <| Test.expect (rebase +0 [] +10 === None)", - "name": "allYourBase.test.ex14" + "name": "input base is zero", + "test_code": "let\n Test.label.deprecated \"input base is zero\" <| Test.expect (rebase +0 [] +10 === None)" }, { - "test_code": "allYourBase.test.ex15 = let\n\tTest.label \"input base is negative\" <| Test.expect (rebase -2 [+1] +10 === None)", - "name": "allYourBase.test.ex15" + "name": "input base is negative", + "test_code": "let\n Test.label.deprecated \"input base is negative\" <| Test.expect (rebase -2 [+1] +10 === None)" }, { - "test_code": "allYourBase.test.ex16 = let\n\tTest.label \"negative digit\" <| Test.expect (rebase +2 [+1,-1,+1,+0,+1,+0] +10 === None)", - "name": "allYourBase.test.ex16" + "name": "negative digit", + "test_code": "let\n Test.label.deprecated \"negative digit\" <| Test.expect (rebase +2 [+1,-1,+1,+0,+1,+0] +10 === None)" }, { - "test_code": "allYourBase.test.ex17 = let\n\tTest.label \"invalid positive digit\" <| Test.expect (rebase +2 [+1,-1,+1,+0,+1,+0] +10 === None)", - "name": "allYourBase.test.ex17" + "name": "invalid positive digit", + "test_code": "let\n Test.label.deprecated \"invalid positive digit\" <| Test.expect (rebase +2 [+1,+2,+1,+0,+1,+0] +10 === None)" }, { - "test_code": "allYourBase.test.ex18 = let\n\tTest.label \"output base is one\" <| Test.expect (rebase +2 [+1,+2,+1,+0,+1,+0] +10 === None)", - "name": "allYourBase.test.ex18" + "name": "output base is one", + "test_code": "let\n Test.label.deprecated \"output base is one\" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +1 === None)" }, { - "test_code": "allYourBase.test.ex19 = let\n\tTest.label \"output base is zero\" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +1 === None)", - "name": "allYourBase.test.ex19" + "name": "output base is zero", + "test_code": "let\n Test.label.deprecated \"output base is zero\" <| Test.expect (rebase +10 [+7] +0 === None)" }, { - "test_code": "allYourBase.test.ex20 = let\n\tTest.label \"output base is negative\" <| Test.expect (rebase +2 [+1] -7 === None)", - "name": "allYourBase.test.ex20" + "name": "output base is negative", + "test_code": "let\n Test.label.deprecated \"output base is negative\" <| Test.expect (rebase +2 [+1] -7 === None)" }, { - "test_code": "allYourBase.test.ex21 = let\n\tTest.label \"both bases are negative\" <| Test.expect (rebase -2 [+1] -7 === None)", - "name": "allYourBase.test.ex21" + "name": "both bases are negative", + "test_code": "let\n Test.label.deprecated \"both bases are negative\" <| Test.expect (rebase -2 [+1] -7 === None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/all-your-base/.meta/testLoader.md b/exercises/practice/all-your-base/.meta/testLoader.md index 771f95b..3b2b5b3 100644 --- a/exercises/practice/all-your-base/.meta/testLoader.md +++ b/exercises/practice/all-your-base/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./allYourBase.u -.> add -.> load ./allYourBase.test.u -.> add -.> move.term allYourBase.tests tests +scratch/main> load ./allYourBase.u +scratch/main> add +scratch/main> load ./allYourBase.test.u +scratch/main> add +scratch/main> move.term allYourBase.tests tests ``` diff --git a/exercises/practice/all-your-base/allYourBase.test.u b/exercises/practice/all-your-base/allYourBase.test.u index 4df53af..4282554 100644 --- a/exercises/practice/all-your-base/allYourBase.test.u +++ b/exercises/practice/all-your-base/allYourBase.test.u @@ -1,65 +1,65 @@ allYourBase.test.ex1 = let - Test.label "single bit one to decimal" <| Test.expect (rebase +2 [+1] +10 === Some [+1]) + Test.label.deprecated "single bit one to decimal" <| Test.expect (rebase +2 [+1] +10 === Some [+1]) allYourBase.test.ex2 = let - Test.label "binary to single decimal" <| Test.expect (rebase +2 [+1,+0,+1] +10 === Some [+5]) + Test.label.deprecated "binary to single decimal" <| Test.expect (rebase +2 [+1,+0,+1] +10 === Some [+5]) allYourBase.test.ex3 = let - Test.label "single decimal to binary" <| Test.expect (rebase +10 [+5] +2 === Some [+1,+0,+1]) + Test.label.deprecated "single decimal to binary" <| Test.expect (rebase +10 [+5] +2 === Some [+1,+0,+1]) allYourBase.test.ex4 = let - Test.label "binary to multiple decimal" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +10 === Some [+4,+2]) + Test.label.deprecated "binary to multiple decimal" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +10 === Some [+4,+2]) allYourBase.test.ex5 = let - Test.label "decimal to binary" <| Test.expect (rebase +10 [+4,+2] +2 === Some [+1,+0,+1,+0,+1,+0]) + Test.label.deprecated "decimal to binary" <| Test.expect (rebase +10 [+4,+2] +2 === Some [+1,+0,+1,+0,+1,+0]) allYourBase.test.ex6 = let - Test.label "trinary to hexadecimal" <| Test.expect (rebase +3 [+1,+1,+2,+0] +16 === Some [+2,+10]) + Test.label.deprecated "trinary to hexadecimal" <| Test.expect (rebase +3 [+1,+1,+2,+0] +16 === Some [+2,+10]) allYourBase.test.ex7 = let - Test.label "hexadecimal to trinary" <| Test.expect (rebase +16 [+2,+10] +3 === Some [+1,+1,+2,+0]) + Test.label.deprecated "hexadecimal to trinary" <| Test.expect (rebase +16 [+2,+10] +3 === Some [+1,+1,+2,+0]) allYourBase.test.ex8 = let - Test.label "15-bit integer" <| Test.expect (rebase +97 [+3,+46,+60] +73 === Some [+6,+10,+45]) + Test.label.deprecated "15-bit integer" <| Test.expect (rebase +97 [+3,+46,+60] +73 === Some [+6,+10,+45]) allYourBase.test.ex9 = let - Test.label "empty list" <| Test.expect (rebase +2 [] +10 === Some [+0]) + Test.label.deprecated "empty list" <| Test.expect (rebase +2 [] +10 === Some [+0]) allYourBase.test.ex10 = let - Test.label "single zero" <| Test.expect (rebase +10 [+0] +2 === Some [+0]) + Test.label.deprecated "single zero" <| Test.expect (rebase +10 [+0] +2 === Some [+0]) allYourBase.test.ex11 = let - Test.label "multiple zeros" <| Test.expect (rebase +10 [+0,+0,+0] +2 === Some [+0]) + Test.label.deprecated "multiple zeros" <| Test.expect (rebase +10 [+0,+0,+0] +2 === Some [+0]) allYourBase.test.ex12 = let - Test.label "leading zeros" <| Test.expect (rebase +7 [+0,+6,+0] +10 === Some [+4,+2]) + Test.label.deprecated "leading zeros" <| Test.expect (rebase +7 [+0,+6,+0] +10 === Some [+4,+2]) allYourBase.test.ex13 = let - Test.label "input base is one" <| Test.expect (rebase +1 [+0] +10 === None) + Test.label.deprecated "input base is one" <| Test.expect (rebase +1 [+0] +10 === None) allYourBase.test.ex14 = let - Test.label "input base is zero" <| Test.expect (rebase +0 [] +10 === None) + Test.label.deprecated "input base is zero" <| Test.expect (rebase +0 [] +10 === None) allYourBase.test.ex15 = let - Test.label "input base is negative" <| Test.expect (rebase -2 [+1] +10 === None) + Test.label.deprecated "input base is negative" <| Test.expect (rebase -2 [+1] +10 === None) allYourBase.test.ex16 = let - Test.label "negative digit" <| Test.expect (rebase +2 [+1,-1,+1,+0,+1,+0] +10 === None) + Test.label.deprecated "negative digit" <| Test.expect (rebase +2 [+1,-1,+1,+0,+1,+0] +10 === None) allYourBase.test.ex17 = let - Test.label "invalid positive digit" <| Test.expect (rebase +2 [+1,+2,+1,+0,+1,+0] +10 === None) + Test.label.deprecated "invalid positive digit" <| Test.expect (rebase +2 [+1,+2,+1,+0,+1,+0] +10 === None) allYourBase.test.ex18 = let - Test.label "output base is one" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +1 === None) + Test.label.deprecated "output base is one" <| Test.expect (rebase +2 [+1,+0,+1,+0,+1,+0] +1 === None) allYourBase.test.ex19 = let - Test.label "output base is zero" <| Test.expect (rebase +10 [+7] +0 === None) + Test.label.deprecated "output base is zero" <| Test.expect (rebase +10 [+7] +0 === None) allYourBase.test.ex20 = let - Test.label "output base is negative" <| Test.expect (rebase +2 [+1] -7 === None) + Test.label.deprecated "output base is negative" <| Test.expect (rebase +2 [+1] -7 === None) allYourBase.test.ex21 = let - Test.label "both bases are negative" <| Test.expect (rebase -2 [+1] -7 === None) + Test.label.deprecated "both bases are negative" <| Test.expect (rebase -2 [+1] -7 === None) test> allYourBase.tests = runAll [ allYourBase.test.ex1, diff --git a/exercises/practice/allergies/.meta/testAnnotation.json b/exercises/practice/allergies/.meta/testAnnotation.json index f61b6e9..445513a 100644 --- a/exercises/practice/allergies/.meta/testAnnotation.json +++ b/exercises/practice/allergies/.meta/testAnnotation.json @@ -1,202 +1,202 @@ [ { - "test_code": "allergies.test.ex1 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"eggs\" 0 === false)", - "name": "allergies.test.ex1" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"eggs\" 0 === false)" }, { - "test_code": "allergies.test.ex2 = let\n\tTest.label \"allergic only to eggs\" <| Test.expect (allergicTo \"eggs\" 1 === true)", - "name": "allergies.test.ex2" + "name": "allergic only to eggs", + "test_code": "let\n Test.label.deprecated \"allergic only to eggs\" <| Test.expect (allergicTo \"eggs\" 1 === true)" }, { - "test_code": "allergies.test.ex3 = let\n\tTest.label \"allergic to eggs and something else\" <| Test.expect (allergicTo \"eggs\" 3 === true)", - "name": "allergies.test.ex3" + "name": "allergic to eggs and something else", + "test_code": "let\n Test.label.deprecated \"allergic to eggs and something else\" <| Test.expect (allergicTo \"eggs\" 3 === true)" }, { - "test_code": "allergies.test.ex4 = let\n\tTest.label \"allergic to something, but not eggs\" <| Test.expect (allergicTo \"eggs\" 2 === false)", - "name": "allergies.test.ex4" + "name": "allergic to something, but not eggs", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not eggs\" <| Test.expect (allergicTo \"eggs\" 2 === false)" }, { - "test_code": "allergies.test.ex5 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"eggs\" 255 === true)", - "name": "allergies.test.ex5" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"eggs\" 255 === true)" }, { - "test_code": "allergies.test.ex6 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"peanuts\" 0 === false)", - "name": "allergies.test.ex6" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"peanuts\" 0 === false)" }, { - "test_code": "allergies.test.ex7 = let\n\tTest.label \"allergic only to peanuts\" <| Test.expect (allergicTo \"peanuts\" 2 === true)", - "name": "allergies.test.ex7" + "name": "allergic only to peanuts", + "test_code": "let\n Test.label.deprecated \"allergic only to peanuts\" <| Test.expect (allergicTo \"peanuts\" 2 === true)" }, { - "test_code": "allergies.test.ex8 = let\n\tTest.label \"allergic to peanuts and something else\" <| Test.expect (allergicTo \"peanuts\" 7 === true)", - "name": "allergies.test.ex8" + "name": "allergic to peanuts and something else", + "test_code": "let\n Test.label.deprecated \"allergic to peanuts and something else\" <| Test.expect (allergicTo \"peanuts\" 7 === true)" }, { - "test_code": "allergies.test.ex9 = let\n\tTest.label \"allergic to something, but not peanuts\" <| Test.expect (allergicTo \"peanuts\" 5 === false)", - "name": "allergies.test.ex9" + "name": "allergic to something, but not peanuts", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not peanuts\" <| Test.expect (allergicTo \"peanuts\" 5 === false)" }, { - "test_code": "allergies.test.ex10 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"peanuts\" 255 === true)", - "name": "allergies.test.ex10" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"peanuts\" 255 === true)" }, { - "test_code": "allergies.test.ex11 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"shellfish\" 0 === false)", - "name": "allergies.test.ex11" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"shellfish\" 0 === false)" }, { - "test_code": "allergies.test.ex12 = let\n\tTest.label \"allergic only to shellfish\" <| Test.expect (allergicTo \"shellfish\" 4 === true)", - "name": "allergies.test.ex12" + "name": "allergic only to shellfish", + "test_code": "let\n Test.label.deprecated \"allergic only to shellfish\" <| Test.expect (allergicTo \"shellfish\" 4 === true)" }, { - "test_code": "allergies.test.ex13 = let\n\tTest.label \"allergic to shellfish and something else\" <| Test.expect (allergicTo \"shellfish\" 14 === true)", - "name": "allergies.test.ex13" + "name": "allergic to shellfish and something else", + "test_code": "let\n Test.label.deprecated \"allergic to shellfish and something else\" <| Test.expect (allergicTo \"shellfish\" 14 === true)" }, { - "test_code": "allergies.test.ex14 = let\n\tTest.label \"allergic to something, but not shellfish\" <| Test.expect (allergicTo \"shellfish\" 10 === false)", - "name": "allergies.test.ex14" + "name": "allergic to something, but not shellfish", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not shellfish\" <| Test.expect (allergicTo \"shellfish\" 10 === false)" }, { - "test_code": "allergies.test.ex15 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"shellfish\" 255 === true)", - "name": "allergies.test.ex15" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"shellfish\" 255 === true)" }, { - "test_code": "allergies.test.ex16 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"strawberries\" 0 === false)", - "name": "allergies.test.ex16" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"strawberries\" 0 === false)" }, { - "test_code": "allergies.test.ex17 = let\n\tTest.label \"allergic only to strawberries\" <| Test.expect (allergicTo \"strawberries\" 8 === true)", - "name": "allergies.test.ex17" + "name": "allergic only to strawberries", + "test_code": "let\n Test.label.deprecated \"allergic only to strawberries\" <| Test.expect (allergicTo \"strawberries\" 8 === true)" }, { - "test_code": "allergies.test.ex18 = let\n\tTest.label \"allergic to strawberries and something else\" <| Test.expect (allergicTo \"strawberries\" 28 === true)", - "name": "allergies.test.ex18" + "name": "allergic to strawberries and something else", + "test_code": "let\n Test.label.deprecated \"allergic to strawberries and something else\" <| Test.expect (allergicTo \"strawberries\" 28 === true)" }, { - "test_code": "allergies.test.ex19 = let\n\tTest.label \"allergic to something, but not strawberries\" <| Test.expect (allergicTo \"strawberries\" 20 === false)", - "name": "allergies.test.ex19" + "name": "allergic to something, but not strawberries", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not strawberries\" <| Test.expect (allergicTo \"strawberries\" 20 === false)" }, { - "test_code": "allergies.test.ex20 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"strawberries\" 255 === true)", - "name": "allergies.test.ex20" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"strawberries\" 255 === true)" }, { - "test_code": "allergies.test.ex21 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"tomatoes\" 0 === false)", - "name": "allergies.test.ex21" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"tomatoes\" 0 === false)" }, { - "test_code": "allergies.test.ex22 = let\n\tTest.label \"allergic only to tomatoes\" <| Test.expect (allergicTo \"tomatoes\" 16 === true)", - "name": "allergies.test.ex22" + "name": "allergic only to tomatoes", + "test_code": "let\n Test.label.deprecated \"allergic only to tomatoes\" <| Test.expect (allergicTo \"tomatoes\" 16 === true)" }, { - "test_code": "allergies.test.ex23 = let\n\tTest.label \"allergic to tomatoes and something else\" <| Test.expect (allergicTo \"tomatoes\" 56 === true)", - "name": "allergies.test.ex23" + "name": "allergic to tomatoes and something else", + "test_code": "let\n Test.label.deprecated \"allergic to tomatoes and something else\" <| Test.expect (allergicTo \"tomatoes\" 56 === true)" }, { - "test_code": "allergies.test.ex24 = let\n\tTest.label \"allergic to something, but not tomatoes\" <| Test.expect (allergicTo \"tomatoes\" 40 === false)", - "name": "allergies.test.ex24" + "name": "allergic to something, but not tomatoes", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not tomatoes\" <| Test.expect (allergicTo \"tomatoes\" 40 === false)" }, { - "test_code": "allergies.test.ex25 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"tomatoes\" 255 === true)", - "name": "allergies.test.ex25" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"tomatoes\" 255 === true)" }, { - "test_code": "allergies.test.ex26 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"chocolate\" 0 === false)", - "name": "allergies.test.ex26" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"chocolate\" 0 === false)" }, { - "test_code": "allergies.test.ex27 = let\n\tTest.label \"allergic only to chocolate\" <| Test.expect (allergicTo \"chocolate\" 32 === true)", - "name": "allergies.test.ex27" + "name": "allergic only to chocolate", + "test_code": "let\n Test.label.deprecated \"allergic only to chocolate\" <| Test.expect (allergicTo \"chocolate\" 32 === true)" }, { - "test_code": "allergies.test.ex28 = let\n\tTest.label \"allergic to chocolate and something else\" <| Test.expect (allergicTo \"chocolate\" 112 === true)", - "name": "allergies.test.ex28" + "name": "allergic to chocolate and something else", + "test_code": "let\n Test.label.deprecated \"allergic to chocolate and something else\" <| Test.expect (allergicTo \"chocolate\" 112 === true)" }, { - "test_code": "allergies.test.ex29 = let\n\tTest.label \"allergic to something, but not chocolate\" <| Test.expect (allergicTo \"chocolate\" 80 === false)", - "name": "allergies.test.ex29" + "name": "allergic to something, but not chocolate", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not chocolate\" <| Test.expect (allergicTo \"chocolate\" 80 === false)" }, { - "test_code": "allergies.test.ex30 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"chocolate\" 255 === true)", - "name": "allergies.test.ex30" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"chocolate\" 255 === true)" }, { - "test_code": "allergies.test.ex31 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"pollen\" 0 === false)", - "name": "allergies.test.ex31" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"pollen\" 0 === false)" }, { - "test_code": "allergies.test.ex32 = let\n\tTest.label \"allergic only to pollen\" <| Test.expect (allergicTo \"pollen\" 64 === true)", - "name": "allergies.test.ex32" + "name": "allergic only to pollen", + "test_code": "let\n Test.label.deprecated \"allergic only to pollen\" <| Test.expect (allergicTo \"pollen\" 64 === true)" }, { - "test_code": "allergies.test.ex33 = let\n\tTest.label \"allergic to pollen and something else\" <| Test.expect (allergicTo \"pollen\" 224 === true)", - "name": "allergies.test.ex33" + "name": "allergic to pollen and something else", + "test_code": "let\n Test.label.deprecated \"allergic to pollen and something else\" <| Test.expect (allergicTo \"pollen\" 224 === true)" }, { - "test_code": "allergies.test.ex34 = let\n\tTest.label \"allergic to something, but not pollen\" <| Test.expect (allergicTo \"pollen\" 160 === false)", - "name": "allergies.test.ex34" + "name": "allergic to something, but not pollen", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not pollen\" <| Test.expect (allergicTo \"pollen\" 160 === false)" }, { - "test_code": "allergies.test.ex35 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"pollen\" 255 === true)", - "name": "allergies.test.ex35" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"pollen\" 255 === true)" }, { - "test_code": "allergies.test.ex36 = let\n\tTest.label \"not allergic to anything\" <| Test.expect (allergicTo \"cats\" 0 === false)", - "name": "allergies.test.ex36" + "name": "not allergic to anything", + "test_code": "let\n Test.label.deprecated \"not allergic to anything\" <| Test.expect (allergicTo \"cats\" 0 === false)" }, { - "test_code": "allergies.test.ex37 = let\n\tTest.label \"allergic only to cats\" <| Test.expect (allergicTo \"cats\" 128 === true)", - "name": "allergies.test.ex37" + "name": "allergic only to cats", + "test_code": "let\n Test.label.deprecated \"allergic only to cats\" <| Test.expect (allergicTo \"cats\" 128 === true)" }, { - "test_code": "allergies.test.ex38 = let\n\tTest.label \"allergic to cats and something else\" <| Test.expect (allergicTo \"cats\" 192 === true)", - "name": "allergies.test.ex38" + "name": "allergic to cats and something else", + "test_code": "let\n Test.label.deprecated \"allergic to cats and something else\" <| Test.expect (allergicTo \"cats\" 192 === true)" }, { - "test_code": "allergies.test.ex39 = let\n\tTest.label \"allergic to something, but not cats\" <| Test.expect (allergicTo \"cats\" 64 === false)", - "name": "allergies.test.ex39" + "name": "allergic to something, but not cats", + "test_code": "let\n Test.label.deprecated \"allergic to something, but not cats\" <| Test.expect (allergicTo \"cats\" 64 === false)" }, { - "test_code": "allergies.test.ex40 = let\n\tTest.label \"allergic to everything\" <| Test.expect (allergicTo \"cats\" 255 === true)", - "name": "allergies.test.ex40" + "name": "allergic to everything", + "test_code": "let\n Test.label.deprecated \"allergic to everything\" <| Test.expect (allergicTo \"cats\" 255 === true)" }, { - "test_code": "allergies.test.ex41 = let\n\tTest.label \"no allergies\" <| Test.expect (list 0 === [])", - "name": "allergies.test.ex41" + "name": "no allergies", + "test_code": "let\n Test.label.deprecated \"no allergies\" <| Test.expect (list 0 === [])" }, { - "test_code": "allergies.test.ex42 = let\n\tTest.label \"just eggs\" <| Test.expect (list 1 === [\"eggs\"])", - "name": "allergies.test.ex42" + "name": "just eggs", + "test_code": "let\n Test.label.deprecated \"just eggs\" <| Test.expect (list 1 === [\"eggs\"])" }, { - "test_code": "allergies.test.ex43 = let\n\tTest.label \"just peanuts\" <| Test.expect (list 2 === [\"peanuts\"])", - "name": "allergies.test.ex43" + "name": "just peanuts", + "test_code": "let\n Test.label.deprecated \"just peanuts\" <| Test.expect (list 2 === [\"peanuts\"])" }, { - "test_code": "allergies.test.ex44 = let\n\tTest.label \"just strawberries\" <| Test.expect (list 8 === [\"strawberries\"])", - "name": "allergies.test.ex44" + "name": "just strawberries", + "test_code": "let\n Test.label.deprecated \"just strawberries\" <| Test.expect (list 8 === [\"strawberries\"])" }, { - "test_code": "allergies.test.ex45 = let\n\tTest.label \"eggs and peanuts\" <| Test.expect (list 3 === [\"eggs\",\"peanuts\"])", - "name": "allergies.test.ex45" + "name": "eggs and peanuts", + "test_code": "let\n Test.label.deprecated \"eggs and peanuts\" <| Test.expect (toSorted (list 3) === toSorted [\"eggs\",\"peanuts\"])" }, { - "test_code": "allergies.test.ex46 = let\n\tTest.label \"more than eggs but not peanuts\" <| Test.expect (list 5 === [\"eggs\",\"shellfish\"])", - "name": "allergies.test.ex46" + "name": "more than eggs but not peanuts", + "test_code": "let\n Test.label.deprecated \"more than eggs but not peanuts\" <| Test.expect (toSorted (list 5) === toSorted [\"eggs\",\"shellfish\"])" }, { - "test_code": "allergies.test.ex47 = let\n\tTest.label \"lots of stuff\" <| Test.expect (list 248 === [\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])", - "name": "allergies.test.ex47" + "name": "lots of stuff", + "test_code": "let\n Test.label.deprecated \"lots of stuff\" <| Test.expect (toSorted (list 248) === toSorted [\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])" }, { - "test_code": "allergies.test.ex48 = let\n\tTest.label \"everything\" <| Test.expect (list 255 === [\"eggs\",\"peanuts\",\"shellfish\",\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])", - "name": "allergies.test.ex48" + "name": "everything", + "test_code": "let\n Test.label.deprecated \"everything\" <| Test.expect (toSorted (list 255) === toSorted [\"eggs\",\"peanuts\",\"shellfish\",\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])" }, { - "test_code": "allergies.test.ex49 = let\n\tTest.label \"no allergen score parts\" <| Test.expect (list 509 === [\"eggs\",\"shellfish\",\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])", - "name": "allergies.test.ex49" + "name": "no allergen score parts", + "test_code": "let\n Test.label.deprecated \"no allergen score parts\" <| Test.expect (toSorted (list 509) === toSorted [\"eggs\",\"shellfish\",\"strawberries\",\"tomatoes\",\"chocolate\",\"pollen\",\"cats\"])" }, { - "test_code": "allergies.test.ex50 = let\n\tTest.label \"no allergen score parts without highest valid score\" <| Test.expect (list 257 === [\"eggs\"])", - "name": "allergies.test.ex50" + "name": "no allergen score parts without highest valid score", + "test_code": "let\n Test.label.deprecated \"no allergen score parts without highest valid score\" <| Test.expect (list 257 === [\"eggs\"])" } -] +] \ No newline at end of file diff --git a/exercises/practice/allergies/.meta/testLoader.md b/exercises/practice/allergies/.meta/testLoader.md index 27b421a..7c5f7f6 100644 --- a/exercises/practice/allergies/.meta/testLoader.md +++ b/exercises/practice/allergies/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./allergies.u -.> add -.> load ./allergies.test.u -.> add -.> move.term allergies.tests tests +scratch/main> load ./allergies.u +scratch/main> add +scratch/main> load ./allergies.test.u +scratch/main> add +scratch/main> move.term allergies.tests tests ``` diff --git a/exercises/practice/allergies/allergies.test.u b/exercises/practice/allergies/allergies.test.u index b4e15c2..fc8123e 100644 --- a/exercises/practice/allergies/allergies.test.u +++ b/exercises/practice/allergies/allergies.test.u @@ -2,154 +2,154 @@ allergies.toSorted : [a] -> [a] allergies.toSorted xs = List.sortBy id xs allergies.test.ex1 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "eggs" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "eggs" 0 === false) allergies.test.ex2 = let - Test.label "allergic only to eggs" <| Test.expect (allergicTo "eggs" 1 === true) + Test.label.deprecated "allergic only to eggs" <| Test.expect (allergicTo "eggs" 1 === true) allergies.test.ex3 = let - Test.label "allergic to eggs and something else" <| Test.expect (allergicTo "eggs" 3 === true) + Test.label.deprecated "allergic to eggs and something else" <| Test.expect (allergicTo "eggs" 3 === true) allergies.test.ex4 = let - Test.label "allergic to something, but not eggs" <| Test.expect (allergicTo "eggs" 2 === false) + Test.label.deprecated "allergic to something, but not eggs" <| Test.expect (allergicTo "eggs" 2 === false) allergies.test.ex5 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "eggs" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "eggs" 255 === true) allergies.test.ex6 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "peanuts" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "peanuts" 0 === false) allergies.test.ex7 = let - Test.label "allergic only to peanuts" <| Test.expect (allergicTo "peanuts" 2 === true) + Test.label.deprecated "allergic only to peanuts" <| Test.expect (allergicTo "peanuts" 2 === true) allergies.test.ex8 = let - Test.label "allergic to peanuts and something else" <| Test.expect (allergicTo "peanuts" 7 === true) + Test.label.deprecated "allergic to peanuts and something else" <| Test.expect (allergicTo "peanuts" 7 === true) allergies.test.ex9 = let - Test.label "allergic to something, but not peanuts" <| Test.expect (allergicTo "peanuts" 5 === false) + Test.label.deprecated "allergic to something, but not peanuts" <| Test.expect (allergicTo "peanuts" 5 === false) allergies.test.ex10 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "peanuts" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "peanuts" 255 === true) allergies.test.ex11 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "shellfish" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "shellfish" 0 === false) allergies.test.ex12 = let - Test.label "allergic only to shellfish" <| Test.expect (allergicTo "shellfish" 4 === true) + Test.label.deprecated "allergic only to shellfish" <| Test.expect (allergicTo "shellfish" 4 === true) allergies.test.ex13 = let - Test.label "allergic to shellfish and something else" <| Test.expect (allergicTo "shellfish" 14 === true) + Test.label.deprecated "allergic to shellfish and something else" <| Test.expect (allergicTo "shellfish" 14 === true) allergies.test.ex14 = let - Test.label "allergic to something, but not shellfish" <| Test.expect (allergicTo "shellfish" 10 === false) + Test.label.deprecated "allergic to something, but not shellfish" <| Test.expect (allergicTo "shellfish" 10 === false) allergies.test.ex15 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "shellfish" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "shellfish" 255 === true) allergies.test.ex16 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "strawberries" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "strawberries" 0 === false) allergies.test.ex17 = let - Test.label "allergic only to strawberries" <| Test.expect (allergicTo "strawberries" 8 === true) + Test.label.deprecated "allergic only to strawberries" <| Test.expect (allergicTo "strawberries" 8 === true) allergies.test.ex18 = let - Test.label "allergic to strawberries and something else" <| Test.expect (allergicTo "strawberries" 28 === true) + Test.label.deprecated "allergic to strawberries and something else" <| Test.expect (allergicTo "strawberries" 28 === true) allergies.test.ex19 = let - Test.label "allergic to something, but not strawberries" <| Test.expect (allergicTo "strawberries" 20 === false) + Test.label.deprecated "allergic to something, but not strawberries" <| Test.expect (allergicTo "strawberries" 20 === false) allergies.test.ex20 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "strawberries" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "strawberries" 255 === true) allergies.test.ex21 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "tomatoes" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "tomatoes" 0 === false) allergies.test.ex22 = let - Test.label "allergic only to tomatoes" <| Test.expect (allergicTo "tomatoes" 16 === true) + Test.label.deprecated "allergic only to tomatoes" <| Test.expect (allergicTo "tomatoes" 16 === true) allergies.test.ex23 = let - Test.label "allergic to tomatoes and something else" <| Test.expect (allergicTo "tomatoes" 56 === true) + Test.label.deprecated "allergic to tomatoes and something else" <| Test.expect (allergicTo "tomatoes" 56 === true) allergies.test.ex24 = let - Test.label "allergic to something, but not tomatoes" <| Test.expect (allergicTo "tomatoes" 40 === false) + Test.label.deprecated "allergic to something, but not tomatoes" <| Test.expect (allergicTo "tomatoes" 40 === false) allergies.test.ex25 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "tomatoes" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "tomatoes" 255 === true) allergies.test.ex26 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "chocolate" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "chocolate" 0 === false) allergies.test.ex27 = let - Test.label "allergic only to chocolate" <| Test.expect (allergicTo "chocolate" 32 === true) + Test.label.deprecated "allergic only to chocolate" <| Test.expect (allergicTo "chocolate" 32 === true) allergies.test.ex28 = let - Test.label "allergic to chocolate and something else" <| Test.expect (allergicTo "chocolate" 112 === true) + Test.label.deprecated "allergic to chocolate and something else" <| Test.expect (allergicTo "chocolate" 112 === true) allergies.test.ex29 = let - Test.label "allergic to something, but not chocolate" <| Test.expect (allergicTo "chocolate" 80 === false) + Test.label.deprecated "allergic to something, but not chocolate" <| Test.expect (allergicTo "chocolate" 80 === false) allergies.test.ex30 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "chocolate" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "chocolate" 255 === true) allergies.test.ex31 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "pollen" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "pollen" 0 === false) allergies.test.ex32 = let - Test.label "allergic only to pollen" <| Test.expect (allergicTo "pollen" 64 === true) + Test.label.deprecated "allergic only to pollen" <| Test.expect (allergicTo "pollen" 64 === true) allergies.test.ex33 = let - Test.label "allergic to pollen and something else" <| Test.expect (allergicTo "pollen" 224 === true) + Test.label.deprecated "allergic to pollen and something else" <| Test.expect (allergicTo "pollen" 224 === true) allergies.test.ex34 = let - Test.label "allergic to something, but not pollen" <| Test.expect (allergicTo "pollen" 160 === false) + Test.label.deprecated "allergic to something, but not pollen" <| Test.expect (allergicTo "pollen" 160 === false) allergies.test.ex35 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "pollen" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "pollen" 255 === true) allergies.test.ex36 = let - Test.label "not allergic to anything" <| Test.expect (allergicTo "cats" 0 === false) + Test.label.deprecated "not allergic to anything" <| Test.expect (allergicTo "cats" 0 === false) allergies.test.ex37 = let - Test.label "allergic only to cats" <| Test.expect (allergicTo "cats" 128 === true) + Test.label.deprecated "allergic only to cats" <| Test.expect (allergicTo "cats" 128 === true) allergies.test.ex38 = let - Test.label "allergic to cats and something else" <| Test.expect (allergicTo "cats" 192 === true) + Test.label.deprecated "allergic to cats and something else" <| Test.expect (allergicTo "cats" 192 === true) allergies.test.ex39 = let - Test.label "allergic to something, but not cats" <| Test.expect (allergicTo "cats" 64 === false) + Test.label.deprecated "allergic to something, but not cats" <| Test.expect (allergicTo "cats" 64 === false) allergies.test.ex40 = let - Test.label "allergic to everything" <| Test.expect (allergicTo "cats" 255 === true) + Test.label.deprecated "allergic to everything" <| Test.expect (allergicTo "cats" 255 === true) allergies.test.ex41 = let - Test.label "no allergies" <| Test.expect (list 0 === []) + Test.label.deprecated "no allergies" <| Test.expect (list 0 === []) allergies.test.ex42 = let - Test.label "just eggs" <| Test.expect (list 1 === ["eggs"]) + Test.label.deprecated "just eggs" <| Test.expect (list 1 === ["eggs"]) allergies.test.ex43 = let - Test.label "just peanuts" <| Test.expect (list 2 === ["peanuts"]) + Test.label.deprecated "just peanuts" <| Test.expect (list 2 === ["peanuts"]) allergies.test.ex44 = let - Test.label "just strawberries" <| Test.expect (list 8 === ["strawberries"]) + Test.label.deprecated "just strawberries" <| Test.expect (list 8 === ["strawberries"]) allergies.test.ex45 = let - Test.label "eggs and peanuts" <| Test.expect (toSorted (list 3) === toSorted ["eggs","peanuts"]) + Test.label.deprecated "eggs and peanuts" <| Test.expect (toSorted (list 3) === toSorted ["eggs","peanuts"]) allergies.test.ex46 = let - Test.label "more than eggs but not peanuts" <| Test.expect (toSorted (list 5) === toSorted ["eggs","shellfish"]) + Test.label.deprecated "more than eggs but not peanuts" <| Test.expect (toSorted (list 5) === toSorted ["eggs","shellfish"]) allergies.test.ex47 = let - Test.label "lots of stuff" <| Test.expect (toSorted (list 248) === toSorted ["strawberries","tomatoes","chocolate","pollen","cats"]) + Test.label.deprecated "lots of stuff" <| Test.expect (toSorted (list 248) === toSorted ["strawberries","tomatoes","chocolate","pollen","cats"]) allergies.test.ex48 = let - Test.label "everything" <| Test.expect (toSorted (list 255) === toSorted ["eggs","peanuts","shellfish","strawberries","tomatoes","chocolate","pollen","cats"]) + Test.label.deprecated "everything" <| Test.expect (toSorted (list 255) === toSorted ["eggs","peanuts","shellfish","strawberries","tomatoes","chocolate","pollen","cats"]) allergies.test.ex49 = let - Test.label "no allergen score parts" <| Test.expect (toSorted (list 509) === toSorted ["eggs","shellfish","strawberries","tomatoes","chocolate","pollen","cats"]) + Test.label.deprecated "no allergen score parts" <| Test.expect (toSorted (list 509) === toSorted ["eggs","shellfish","strawberries","tomatoes","chocolate","pollen","cats"]) allergies.test.ex50 = let - Test.label "no allergen score parts without highest valid score" <| Test.expect (list 257 === ["eggs"]) + Test.label.deprecated "no allergen score parts without highest valid score" <| Test.expect (list 257 === ["eggs"]) test> allergies.tests = runAll [ allergies.test.ex1, diff --git a/exercises/practice/anagram/.meta/testAnnotation.json b/exercises/practice/anagram/.meta/testAnnotation.json index eabbacd..f213cf0 100644 --- a/exercises/practice/anagram/.meta/testAnnotation.json +++ b/exercises/practice/anagram/.meta/testAnnotation.json @@ -1,66 +1,66 @@ [ { "name": "no matches", - "test_code": "anagram.findAnagrams.tests.ex1 = let\n actual = findAnagrams \"diaper\" [\"hello\", \"world\", \"zombies\", \"pants\"]\n Test.label \"no matches\" <| Test.expect (actual === [])" + "test_code": "let\n actual = findAnagrams \"diaper\" [\"hello\", \"world\", \"zombies\", \"pants\"]\n Test.label.deprecated \"no matches\" <| Test.expect (actual === [])" }, { "name": "detects two anagrams", - "test_code": "anagram.findAnagrams.tests.ex2 = let\n actual = findAnagrams \"solemn\" [\"lemons\",\"cherry\",\"melons\"]\n expected = [\"lemons\",\"melons\"]\n Test.label \"detects two anagrams\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"solemn\" [\"lemons\",\"cherry\",\"melons\"]\n expected = [\"lemons\",\"melons\"]\n Test.label.deprecated \"detects two anagrams\" <| Test.expect (actual === expected)" }, { "name": "does not detect anagram subsets", - "test_code": "anagram.findAnagrams.tests.ex3 = let\n actual = findAnagrams \"good\" [\"dog\",\"goody\"]\n expected = []\n Test.label \"does not detect anagram subsets\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"good\" [\"dog\",\"goody\"]\n expected = []\n Test.label.deprecated \"does not detect anagram subsets\" <| Test.expect (actual === expected)" }, { "name": "detects anagram", - "test_code": "anagram.findAnagrams.tests.ex4 = let\n actual = findAnagrams \"listen\" [\"enlists\",\"google\",\"inlets\",\"banana\"]\n expected = [\"inlets\"]\n Test.label \"detects anagram\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"listen\" [\"enlists\",\"google\",\"inlets\",\"banana\"]\n expected = [\"inlets\"]\n Test.label.deprecated \"detects anagram\" <| Test.expect (actual === expected)" }, { "name": "detects three anagrams", - "test_code": "anagram.findAnagrams.tests.ex5 = let\n actual = findAnagrams \"allergy\" [\"gallery\",\"ballerina\",\"regally\",\"clergy\",\"largely\",\"leading\"]\n expected = [\"gallery\",\"regally\",\"largely\"]\n Test.label \"detects three anagrams\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"allergy\" [\"gallery\",\"ballerina\",\"regally\",\"clergy\",\"largely\",\"leading\"]\n expected = [\"gallery\",\"regally\",\"largely\"]\n Test.label.deprecated \"detects three anagrams\" <| Test.expect (actual === expected)" }, { "name": "detects multiple anagrams with different case", - "test_code": "anagram.findAnagrams.tests.ex6 = let\n actual = findAnagrams \"nose\" [\"Eons\",\"ONES\"]\n expected = [\"Eons\",\"ONES\"]\n Test.label \"detects multiple anagrams with different case\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"nose\" [\"Eons\",\"ONES\"]\n expected = [\"Eons\",\"ONES\"]\n Test.label.deprecated \"detects multiple anagrams with different case\" <| Test.expect (actual === expected)" }, { "name": "does not detect non-anagrams with identical checksum", - "test_code": "anagram.findAnagrams.tests.ex7 = let\n actual = findAnagrams \"mass\" [\"last\"]\n expected = []\n Test.label \"does not detect non-anagrams with identical checksum\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"mass\" [\"last\"]\n expected = []\n Test.label.deprecated \"does not detect non-anagrams with identical checksum\" <| Test.expect (actual === expected)" }, { "name": "detects anagrams case-insensitively", - "test_code": "anagram.findAnagrams.tests.ex8 = let\n actual = findAnagrams \"Orchestra\" [\"cashregister\",\"Carthorse\",\"radishes\"]\n expected = [\"Carthorse\"]\n Test.label \"detects anagrams case-insensitively\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"Orchestra\" [\"cashregister\",\"Carthorse\",\"radishes\"]\n expected = [\"Carthorse\"]\n Test.label.deprecated \"detects anagrams case-insensitively\" <| Test.expect (actual === expected)" }, { "name": "detects anagrams using case-insensitive subject", - "test_code": "anagram.findAnagrams.tests.ex9 = let\n actual = findAnagrams \"Orchestra\" [\"cashregister\",\"carthorse\",\"radishes\"]\n expected = [\"carthorse\"]\n Test.label \"detects anagrams using case-insensitive subject\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"Orchestra\" [\"cashregister\",\"carthorse\",\"radishes\"]\n expected = [\"carthorse\"]\n Test.label.deprecated \"detects anagrams using case-insensitive subject\" <| Test.expect (actual === expected)" }, { "name": "detects anagrams using case-insensitive possible matches", - "test_code": "anagram.findAnagrams.tests.ex10 = let\n actual = findAnagrams \"orchestra\" [\"cashregister\",\"Carthorse\",\"radishes\"]\n expected = [\"Carthorse\"]\n Test.label \"detects anagrams using case-insensitive possible matches\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"orchestra\" [\"cashregister\",\"Carthorse\",\"radishes\"]\n expected = [\"Carthorse\"]\n Test.label.deprecated \"detects anagrams using case-insensitive possible matches\" <| Test.expect (actual === expected)" }, { "name": "does not detect an anagram if the original word is repeated", - "test_code": "anagram.findAnagrams.tests.ex11 = let \n actual = findAnagrams \"go\" [\"go Go GO\"]\n expected = []\n Test.label \"does not detect an anagram if the original word is repeated\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"go\" [\"go Go GO\"]\n expected = []\n Test.label.deprecated \"does not detect an anagram if the original word is repeated\" <| Test.expect (actual === expected)" }, { "name": "anagrams must use all letters exactly once", - "test_code": "anagram.findAnagrams.tests.ex12 = let\n actual = findAnagrams \"tapper\" [\"patter\"]\n expected = []\n Test.label \"anagrams must use all letters exactly once\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"tapper\" [\"patter\"]\n expected = []\n Test.label.deprecated \"anagrams must use all letters exactly once\" <| Test.expect (actual === expected)" }, { "name": "words are not anagrams of themselves", - "test_code": "anagram.findAnagrams.tests.ex13 = let\n actual = findAnagrams \"BANANA\" [\"BANANA\"]\n expected = []\n Test.label \"words are not anagrams of themselves\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"BANANA\" [\"BANANA\"]\n expected = []\n Test.label.deprecated \"words are not anagrams of themselves\" <| Test.expect (actual === expected)" }, { "name": "words are not anagrams of themselves even if letter case is partially different", - "test_code": "anagram.findAnagrams.tests.ex14 = let\n actual = findAnagrams \"BANANA\" [\"Banana\"]\n expected = []\n Test.label \"words are not anagrams of themselves even if letter case is partially different\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"BANANA\" [\"Banana\"]\n expected = []\n Test.label.deprecated \"words are not anagrams of themselves even if letter case is partially different\" <| Test.expect (actual === expected)" }, { "name": "words are not anagrams of themselves even if letter case is completely different", - "test_code": "anagram.findAnagrams.tests.ex15 = let\n actual = findAnagrams \"BANANA\" [\"banana\"]\n expected = []\n Test.label \"words are not anagrams of themselves even if letter case is completely different\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"BANANA\" [\"banana\"]\n expected = []\n Test.label.deprecated \"words are not anagrams of themselves even if letter case is completely different\" <| Test.expect (actual === expected)" }, { "name": "words other than themselves can be anagrams", - "test_code": "anagram.findAnagrams.tests.ex16 = let\n actual = findAnagrams \"LISTEN\" [\"LISTEN\",\"Silent\" ]\n expected = [\"Silent\"]\n Test.label \"words other than themselves can be anagrams\" <| Test.expect (actual === expected)" + "test_code": "let\n actual = findAnagrams \"LISTEN\" [\"LISTEN\",\"Silent\" ]\n expected = [\"Silent\"]\n Test.label.deprecated \"words other than themselves can be anagrams\" <| Test.expect (actual === expected)" } -] +] \ No newline at end of file diff --git a/exercises/practice/anagram/.meta/testLoader.md b/exercises/practice/anagram/.meta/testLoader.md index 74c8402..2f31f22 100644 --- a/exercises/practice/anagram/.meta/testLoader.md +++ b/exercises/practice/anagram/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for anagram exercise ```ucm -.> load ./anagram.u -.> add -.> load ./anagram.test.u -.> add -.> move.term anagram.tests tests +scratch/main> load ./anagram.u +scratch/main> add +scratch/main> load ./anagram.test.u +scratch/main> add +scratch/main> move.term anagram.tests tests ``` diff --git a/exercises/practice/anagram/anagram.test.u b/exercises/practice/anagram/anagram.test.u index 9f632e0..182153b 100644 --- a/exercises/practice/anagram/anagram.test.u +++ b/exercises/practice/anagram/anagram.test.u @@ -1,81 +1,81 @@ anagram.findAnagrams.tests.ex1 = let actual = findAnagrams "diaper" ["hello", "world", "zombies", "pants"] - Test.label "no matches" <| Test.expect (actual === []) + Test.label.deprecated "no matches" <| Test.expect (actual === []) anagram.findAnagrams.tests.ex2 = let actual = findAnagrams "solemn" ["lemons","cherry","melons"] expected = ["lemons","melons"] - Test.label "detects two anagrams" <| Test.expect (actual === expected) + Test.label.deprecated "detects two anagrams" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex3 = let actual = findAnagrams "good" ["dog","goody"] expected = [] - Test.label "does not detect anagram subsets" <| Test.expect (actual === expected) + Test.label.deprecated "does not detect anagram subsets" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex4 = let actual = findAnagrams "listen" ["enlists","google","inlets","banana"] expected = ["inlets"] - Test.label "detects anagram" <| Test.expect (actual === expected) + Test.label.deprecated "detects anagram" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex5 = let actual = findAnagrams "allergy" ["gallery","ballerina","regally","clergy","largely","leading"] expected = ["gallery","regally","largely"] - Test.label "detects three anagrams" <| Test.expect (actual === expected) + Test.label.deprecated "detects three anagrams" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex6 = let actual = findAnagrams "nose" ["Eons","ONES"] expected = ["Eons","ONES"] - Test.label "detects multiple anagrams with different case" <| Test.expect (actual === expected) + Test.label.deprecated "detects multiple anagrams with different case" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex7 = let actual = findAnagrams "mass" ["last"] expected = [] - Test.label "does not detect non-anagrams with identical checksum" <| Test.expect (actual === expected) + Test.label.deprecated "does not detect non-anagrams with identical checksum" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex8 = let actual = findAnagrams "Orchestra" ["cashregister","Carthorse","radishes"] expected = ["Carthorse"] - Test.label "detects anagrams case-insensitively" <| Test.expect (actual === expected) + Test.label.deprecated "detects anagrams case-insensitively" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex9 = let actual = findAnagrams "Orchestra" ["cashregister","carthorse","radishes"] expected = ["carthorse"] - Test.label "detects anagrams using case-insensitive subject" <| Test.expect (actual === expected) + Test.label.deprecated "detects anagrams using case-insensitive subject" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex10 = let actual = findAnagrams "orchestra" ["cashregister","Carthorse","radishes"] expected = ["Carthorse"] - Test.label "detects anagrams using case-insensitive possible matches" <| Test.expect (actual === expected) + Test.label.deprecated "detects anagrams using case-insensitive possible matches" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex11 = let actual = findAnagrams "go" ["go Go GO"] expected = [] - Test.label "does not detect an anagram if the original word is repeated" <| Test.expect (actual === expected) + Test.label.deprecated "does not detect an anagram if the original word is repeated" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex12 = let actual = findAnagrams "tapper" ["patter"] expected = [] - Test.label "anagrams must use all letters exactly once" <| Test.expect (actual === expected) + Test.label.deprecated "anagrams must use all letters exactly once" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex13 = let actual = findAnagrams "BANANA" ["BANANA"] expected = [] - Test.label "words are not anagrams of themselves" <| Test.expect (actual === expected) + Test.label.deprecated "words are not anagrams of themselves" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex14 = let actual = findAnagrams "BANANA" ["Banana"] expected = [] - Test.label "words are not anagrams of themselves even if letter case is partially different" <| Test.expect (actual === expected) + Test.label.deprecated "words are not anagrams of themselves even if letter case is partially different" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex15 = let actual = findAnagrams "BANANA" ["banana"] expected = [] - Test.label "words are not anagrams of themselves even if letter case is completely different" <| Test.expect (actual === expected) + Test.label.deprecated "words are not anagrams of themselves even if letter case is completely different" <| Test.expect (actual === expected) anagram.findAnagrams.tests.ex16 = let actual = findAnagrams "LISTEN" ["LISTEN","Silent" ] expected = ["Silent"] - Test.label "words other than themselves can be anagrams" <| Test.expect (actual === expected) + Test.label.deprecated "words other than themselves can be anagrams" <| Test.expect (actual === expected) test> anagram.tests = runAll [ anagram.findAnagrams.tests.ex1, diff --git a/exercises/practice/armstrong-numbers/.meta/testAnnotation.json b/exercises/practice/armstrong-numbers/.meta/testAnnotation.json index 30ab18a..7168af0 100644 --- a/exercises/practice/armstrong-numbers/.meta/testAnnotation.json +++ b/exercises/practice/armstrong-numbers/.meta/testAnnotation.json @@ -1,38 +1,38 @@ [ { - "test_code": "armstrongNumbers.test.ex1 = let\n\tTest.label \"Zero is an Armstrong number\" <| Test.expect (isArmstrongNumber 0 === true)", - "name": "armstrongNumbers.test.ex1" + "name": "Zero is an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Zero is an Armstrong number\" <| Test.expect (isArmstrongNumber 0 === true)" }, { - "test_code": "armstrongNumbers.test.ex2 = let\n\tTest.label \"Single-digit numbers are Armstrong numbers\" <| Test.expect (isArmstrongNumber 5 === true)", - "name": "armstrongNumbers.test.ex2" + "name": "Single-digit numbers are Armstrong numbers", + "test_code": "let\n Test.label.deprecated \"Single-digit numbers are Armstrong numbers\" <| Test.expect (isArmstrongNumber 5 === true)" }, { - "test_code": "armstrongNumbers.test.ex3 = let\n\tTest.label \"There are no two-digit Armstrong numbers\" <| Test.expect (isArmstrongNumber 10 === false)", - "name": "armstrongNumbers.test.ex3" + "name": "There are no two-digit Armstrong numbers", + "test_code": "let\n Test.label.deprecated \"There are no two-digit Armstrong numbers\" <| Test.expect (isArmstrongNumber 10 === false)" }, { - "test_code": "armstrongNumbers.test.ex4 = let\n\tTest.label \"Three-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 153 === true)", - "name": "armstrongNumbers.test.ex4" + "name": "Three-digit number that is an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Three-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 153 === true)" }, { - "test_code": "armstrongNumbers.test.ex5 = let\n\tTest.label \"Three-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 100 === false)", - "name": "armstrongNumbers.test.ex5" + "name": "Three-digit number that is not an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Three-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 100 === false)" }, { - "test_code": "armstrongNumbers.test.ex6 = let\n\tTest.label \"Four-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 9474 === true)", - "name": "armstrongNumbers.test.ex6" + "name": "Four-digit number that is an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Four-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 9474 === true)" }, { - "test_code": "armstrongNumbers.test.ex7 = let\n\tTest.label \"Four-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 9475 === false)", - "name": "armstrongNumbers.test.ex7" + "name": "Four-digit number that is not an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Four-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 9475 === false)" }, { - "test_code": "armstrongNumbers.test.ex8 = let\n\tTest.label \"Seven-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 9926315 === true)", - "name": "armstrongNumbers.test.ex8" + "name": "Seven-digit number that is an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Seven-digit number that is an Armstrong number\" <| Test.expect (isArmstrongNumber 9926315 === true)" }, { - "test_code": "armstrongNumbers.test.ex9 = let\n\tTest.label \"Seven-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 9926314 === false)", - "name": "armstrongNumbers.test.ex9" + "name": "Seven-digit number that is not an Armstrong number", + "test_code": "let\n Test.label.deprecated \"Seven-digit number that is not an Armstrong number\" <| Test.expect (isArmstrongNumber 9926314 === false)" } -] +] \ No newline at end of file diff --git a/exercises/practice/armstrong-numbers/.meta/testLoader.md b/exercises/practice/armstrong-numbers/.meta/testLoader.md index 02f237b..e551717 100644 --- a/exercises/practice/armstrong-numbers/.meta/testLoader.md +++ b/exercises/practice/armstrong-numbers/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./armstrongNumbers.u -.> add -.> load ./armstrongNumbers.test.u -.> add -.> move.term armstrongNumbers.tests tests +scratch/main> load ./armstrongNumbers.u +scratch/main> add +scratch/main> load ./armstrongNumbers.test.u +scratch/main> add +scratch/main> move.term armstrongNumbers.tests tests ``` diff --git a/exercises/practice/armstrong-numbers/armstrongNumbers.test.u b/exercises/practice/armstrong-numbers/armstrongNumbers.test.u index 5c3982e..436c8fa 100644 --- a/exercises/practice/armstrong-numbers/armstrongNumbers.test.u +++ b/exercises/practice/armstrong-numbers/armstrongNumbers.test.u @@ -1,29 +1,29 @@ armstrongNumbers.test.ex1 = let - Test.label "Zero is an Armstrong number" <| Test.expect (isArmstrongNumber 0 === true) + Test.label.deprecated "Zero is an Armstrong number" <| Test.expect (isArmstrongNumber 0 === true) armstrongNumbers.test.ex2 = let - Test.label "Single-digit numbers are Armstrong numbers" <| Test.expect (isArmstrongNumber 5 === true) + Test.label.deprecated "Single-digit numbers are Armstrong numbers" <| Test.expect (isArmstrongNumber 5 === true) armstrongNumbers.test.ex3 = let - Test.label "There are no two-digit Armstrong numbers" <| Test.expect (isArmstrongNumber 10 === false) + Test.label.deprecated "There are no two-digit Armstrong numbers" <| Test.expect (isArmstrongNumber 10 === false) armstrongNumbers.test.ex4 = let - Test.label "Three-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 153 === true) + Test.label.deprecated "Three-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 153 === true) armstrongNumbers.test.ex5 = let - Test.label "Three-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 100 === false) + Test.label.deprecated "Three-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 100 === false) armstrongNumbers.test.ex6 = let - Test.label "Four-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 9474 === true) + Test.label.deprecated "Four-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 9474 === true) armstrongNumbers.test.ex7 = let - Test.label "Four-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 9475 === false) + Test.label.deprecated "Four-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 9475 === false) armstrongNumbers.test.ex8 = let - Test.label "Seven-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 9926315 === true) + Test.label.deprecated "Seven-digit number that is an Armstrong number" <| Test.expect (isArmstrongNumber 9926315 === true) armstrongNumbers.test.ex9 = let - Test.label "Seven-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 9926314 === false) + Test.label.deprecated "Seven-digit number that is not an Armstrong number" <| Test.expect (isArmstrongNumber 9926314 === false) test> armstrongNumbers.tests = runAll [ armstrongNumbers.test.ex1, diff --git a/exercises/practice/binary-search/.meta/testAnnotation.json b/exercises/practice/binary-search/.meta/testAnnotation.json index b2e5c3c..25cfbb5 100644 --- a/exercises/practice/binary-search/.meta/testAnnotation.json +++ b/exercises/practice/binary-search/.meta/testAnnotation.json @@ -1,46 +1,46 @@ [ { - "name": "binarySearch.find.tests.ex1", - "test_code": "expect (Some +0 === binarySearch.find (Array.fromList [6]) 6)\n |> Test.label \"finds a value in an array with one element\"" + "name": "finds a value in an array with one element", + "test_code": "expect (Some +0 === binarySearch.find (Array.fromList [6]) 6)\n |> Test.label.deprecated \"finds a value in an array with one element\"" }, { - "name": "binarySearch.find.tests.ex2", - "test_code": "expect (Some +3 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 6)\n |> Test.label \"finds a value in the middle of an array\"" + "name": "finds a value in the middle of an array", + "test_code": "expect (Some +3 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 6)\n |> Test.label.deprecated \"finds a value in the middle of an array\"" }, { - "name": "binarySearch.find.tests.ex3", - "test_code": "expect (Some +0 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 1)\n |> Test.label \"finds a value at the beginning of an array\"" + "name": "finds a value at the beginning of an array", + "test_code": "expect (Some +0 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 1)\n |> Test.label.deprecated \"finds a value at the beginning of an array\"" }, { - "name": "binarySearch.find.tests.ex4", - "test_code": "expect (Some +6 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 11)\n |> Test.label \"finds a value at the end of an array\"" + "name": "finds a value at the end of an array", + "test_code": "expect (Some +6 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 11)\n |> Test.label.deprecated \"finds a value at the end of an array\"" }, { - "name": "binarySearch.find.tests.ex5", - "test_code": "expect (Some +9 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 634]) 144)\n |> Test.label \"finds a value in an array of odd length\"" + "name": "finds a value in an array of odd length", + "test_code": "expect (Some +9 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 634]) 144)\n |> Test.label.deprecated \"finds a value in an array of odd length\"" }, { - "name": "binarySearch.find.tests.ex6", - "test_code": "expect (Some +5 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]) 21)\n |> Test.label \"finds a value in an array of even length\"" + "name": "finds a value in an array of even length", + "test_code": "expect (Some +5 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]) 21)\n |> Test.label.deprecated \"finds a value in an array of even length\"" }, { - "name": "binarySearch.find.tests.ex7", - "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 7)\n |> Test.label \"identifies that a value is not included in the array\"" + "name": "identifies that a value is not included in the array", + "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 7)\n |> Test.label.deprecated \"identifies that a value is not included in the array\"" }, { - "name": "binarySearch.find.tests.ex8", - "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 0)\n |> Test.label \"a value smaller than the array's smallest value is not found\"" + "name": "a value smaller than the array's smallest value is not found", + "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 0)\n |> Test.label.deprecated \"a value smaller than the array's smallest value is not found\"" }, { - "name": "binarySearch.find.tests.ex9", - "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 13)\n |> Test.label \"a value larger than the array's largest value is not found\"" + "name": "a value larger than the array's largest value is not found", + "test_code": "expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 13)\n |> Test.label.deprecated \"a value larger than the array's largest value is not found\"" }, { - "name": "binarySearch.find.tests.ex10", - "test_code": "expect (None === binarySearch.find (Array.fromList []) 1)\n |> Test.label \"nothing is found in an empty array\"" + "name": "nothing is found in an empty array", + "test_code": "expect (None === binarySearch.find (Array.fromList []) 1)\n |> Test.label.deprecated \"nothing is found in an empty array\"" }, { - "name": "binarySearch.find.tests.ex11", - "test_code": "expect (None === binarySearch.find (Array.fromList [1, 2]) 0)\n |> Test.label \"nothing is found when the left and right bounds cross\"" + "name": "nothing is found when the left and right bounds cross", + "test_code": "expect (None === binarySearch.find (Array.fromList [1, 2]) 0)\n |> Test.label.deprecated \"nothing is found when the left and right bounds cross\"" } -] +] \ No newline at end of file diff --git a/exercises/practice/binary-search/.meta/testLoader.md b/exercises/practice/binary-search/.meta/testLoader.md index 943a4ad..ee07c2a 100644 --- a/exercises/practice/binary-search/.meta/testLoader.md +++ b/exercises/practice/binary-search/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for binary-search exercise ```ucm -.> load ./binarySearch.u -.> add -.> load ./binarySearch.test.u -.> add -.> move.term binarySearch.tests tests +scratch/main> load ./binarySearch.u +scratch/main> add +scratch/main> load ./binarySearch.test.u +scratch/main> add +scratch/main> move.term binarySearch.tests tests ``` diff --git a/exercises/practice/binary-search/binarySearch.test.u b/exercises/practice/binary-search/binarySearch.test.u index 7aca1b8..0b11576 100644 --- a/exercises/practice/binary-search/binarySearch.test.u +++ b/exercises/practice/binary-search/binarySearch.test.u @@ -2,47 +2,47 @@ use data Array binarySearch.find.tests.ex1 = expect (Some +0 === binarySearch.find (Array.fromList [6]) 6) - |> Test.label "finds a value in an array with one element" + |> Test.label.deprecated "finds a value in an array with one element" binarySearch.find.tests.ex2 = expect (Some +3 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 6) - |> Test.label "finds a value in the middle of an array" + |> Test.label.deprecated "finds a value in the middle of an array" binarySearch.find.tests.ex3 = expect (Some +0 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 1) - |> Test.label "finds a value at the beginning of an array" + |> Test.label.deprecated "finds a value at the beginning of an array" binarySearch.find.tests.ex4 = expect (Some +6 === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 11) - |> Test.label "finds a value at the end of an array" + |> Test.label.deprecated "finds a value at the end of an array" binarySearch.find.tests.ex5 = expect (Some +9 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 634]) 144) - |> Test.label "finds a value in an array of odd length" + |> Test.label.deprecated "finds a value in an array of odd length" binarySearch.find.tests.ex6 = expect (Some +5 === binarySearch.find (Array.fromList [1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]) 21) - |> Test.label "finds a value in an array of even length" + |> Test.label.deprecated "finds a value in an array of even length" binarySearch.find.tests.ex7 = expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 7) - |> Test.label "identifies that a value is not included in the array" + |> Test.label.deprecated "identifies that a value is not included in the array" binarySearch.find.tests.ex8 = expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 0) - |> Test.label "a value smaller than the array's smallest value is not found" + |> Test.label.deprecated "a value smaller than the array's smallest value is not found" binarySearch.find.tests.ex9 = expect (None === binarySearch.find (Array.fromList [1, 3, 4, 6, 8, 9, 11]) 13) - |> Test.label "a value larger than the array's largest value is not found" + |> Test.label.deprecated "a value larger than the array's largest value is not found" binarySearch.find.tests.ex10 = expect (None === binarySearch.find (Array.fromList []) 1) - |> Test.label "nothing is found in an empty array" + |> Test.label.deprecated "nothing is found in an empty array" binarySearch.find.tests.ex11 = expect (None === binarySearch.find (Array.fromList [1, 2]) 0) - |> Test.label "nothing is found when the left and right bounds cross" + |> Test.label.deprecated "nothing is found when the left and right bounds cross" test> binarySearch.tests = runAll [ binarySearch.find.tests.ex1, diff --git a/exercises/practice/bob/.meta/testAnnotation.json b/exercises/practice/bob/.meta/testAnnotation.json index dce76b4..20d8377 100644 --- a/exercises/practice/bob/.meta/testAnnotation.json +++ b/exercises/practice/bob/.meta/testAnnotation.json @@ -1,102 +1,102 @@ [ { - "test_code": "bob.test.ex1 = let\n\tTest.label \"Stating something\" <| Test.expect (response \"Tom-ay-to, tom-aaaah-to.\" === \"Whatever.\")", - "name": "bob.test.ex1" + "name": "Stating something", + "test_code": "let\n Test.label.deprecated \"Stating something\" <| Test.expect (response \"Tom-ay-to, tom-aaaah-to.\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex2 = let\n\tTest.label \"Shouting\" <| Test.expect (response \"WATCH OUT!\" === \"Whoa, chill out!\")", - "name": "bob.test.ex2" + "name": "Shouting", + "test_code": "let\n Test.label.deprecated \"Shouting\" <| Test.expect (response \"WATCH OUT!\" === \"Whoa, chill out!\")" }, { - "test_code": "bob.test.ex3 = let\n\tTest.label \"Shouting gibberish\" <| Test.expect (response \"FCECDFCAAB\" === \"Whoa, chill out!\")", - "name": "bob.test.ex3" + "name": "Shouting gibberish", + "test_code": "let\n Test.label.deprecated \"Shouting gibberish\" <| Test.expect (response \"FCECDFCAAB\" === \"Whoa, chill out!\")" }, { - "test_code": "bob.test.ex4 = let\n\tTest.label \"Asking a question\" <| Test.expect (response \"Does this cryogenic chamber make me look fat?\" === \"Sure.\")", - "name": "bob.test.ex4" + "name": "Asking a question", + "test_code": "let\n Test.label.deprecated \"Asking a question\" <| Test.expect (response \"Does this cryogenic chamber make me look fat?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex5 = let\n\tTest.label \"Asking a numeric question\" <| Test.expect (response \"You are, what, like 15?\" === \"Sure.\")", - "name": "bob.test.ex5" + "name": "Asking a numeric question", + "test_code": "let\n Test.label.deprecated \"Asking a numeric question\" <| Test.expect (response \"You are, what, like 15?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex6 = let\n\tTest.label \"Asking gibberish\" <| Test.expect (response \"fffbbcbeab?\" === \"Sure.\")", - "name": "bob.test.ex6" + "name": "Asking gibberish", + "test_code": "let\n Test.label.deprecated \"Asking gibberish\" <| Test.expect (response \"fffbbcbeab?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex7 = let\n\tTest.label \"Talking forcefully\" <| Test.expect (response \"Hi there!\" === \"Whatever.\")", - "name": "bob.test.ex7" + "name": "Talking forcefully", + "test_code": "let\n Test.label.deprecated \"Talking forcefully\" <| Test.expect (response \"Hi there!\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex8 = let\n\tTest.label \"Using acronyms in regular speech\" <| Test.expect (response \"It's OK if you don't want to go work for NASA.\" === \"Whatever.\")", - "name": "bob.test.ex8" + "name": "Using acronyms in regular speech", + "test_code": "let\n Test.label.deprecated \"Using acronyms in regular speech\" <| Test.expect (response \"It's OK if you don't want to go work for NASA.\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex9 = let\n\tTest.label \"Forceful question\" <| Test.expect (response \"WHAT'S GOING ON?\" === \"Calm down, I know what I'm doing!\")", - "name": "bob.test.ex9" + "name": "Forceful question", + "test_code": "let\n Test.label.deprecated \"Forceful question\" <| Test.expect (response \"WHAT'S GOING ON?\" === \"Calm down, I know what I'm doing!\")" }, { - "test_code": "bob.test.ex10 = let\n\tTest.label \"Shouting numbers\" <| Test.expect (response \"1, 2, 3 GO!\" === \"Whoa, chill out!\")", - "name": "bob.test.ex10" + "name": "Shouting numbers", + "test_code": "let\n Test.label.deprecated \"Shouting numbers\" <| Test.expect (response \"1, 2, 3 GO!\" === \"Whoa, chill out!\")" }, { - "test_code": "bob.test.ex11 = let\n\tTest.label \"No letters\" <| Test.expect (response \"1, 2, 3\" === \"Whatever.\")", - "name": "bob.test.ex11" + "name": "No letters", + "test_code": "let\n Test.label.deprecated \"No letters\" <| Test.expect (response \"1, 2, 3\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex12 = let\n\tTest.label \"Question with no letters\" <| Test.expect (response \"4?\" === \"Sure.\")", - "name": "bob.test.ex12" + "name": "Question with no letters", + "test_code": "let\n Test.label.deprecated \"Question with no letters\" <| Test.expect (response \"4?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex13 = let\n\tTest.label \"Shouting with special characters\" <| Test.expect (response \"ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!\" === \"Whoa, chill out!\")", - "name": "bob.test.ex13" + "name": "Shouting with special characters", + "test_code": "let\n Test.label.deprecated \"Shouting with special characters\" <| Test.expect (response \"ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!\" === \"Whoa, chill out!\")" }, { - "test_code": "bob.test.ex14 = let\n\tTest.label \"Shouting with no exclamation mark\" <| Test.expect (response \"I HATE THE DENTIST\" === \"Whoa, chill out!\")", - "name": "bob.test.ex14" + "name": "Shouting with no exclamation mark", + "test_code": "let\n Test.label.deprecated \"Shouting with no exclamation mark\" <| Test.expect (response \"I HATE THE DENTIST\" === \"Whoa, chill out!\")" }, { - "test_code": "bob.test.ex15 = let\n\tTest.label \"Statement containing question mark\" <| Test.expect (response \"Ending with ? means a question.\" === \"Whatever.\")", - "name": "bob.test.ex15" + "name": "Statement containing question mark", + "test_code": "let\n Test.label.deprecated \"Statement containing question mark\" <| Test.expect (response \"Ending with ? means a question.\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex16 = let\n\tTest.label \"Non-letters with question\" <| Test.expect (response \":) ?\" === \"Sure.\")", - "name": "bob.test.ex16" + "name": "Non-letters with question", + "test_code": "let\n Test.label.deprecated \"Non-letters with question\" <| Test.expect (response \":) ?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex17 = let\n\tTest.label \"Prattling on\" <| Test.expect (response \"Wait! Hang on. Are you going to be OK?\" === \"Sure.\")", - "name": "bob.test.ex17" + "name": "Prattling on", + "test_code": "let\n Test.label.deprecated \"Prattling on\" <| Test.expect (response \"Wait! Hang on. Are you going to be OK?\" === \"Sure.\")" }, { - "test_code": "bob.test.ex18 = let\n\tTest.label \"Silence\" <| Test.expect (response \"\" === \"Fine. Be that way!\")", - "name": "bob.test.ex18" + "name": "Silence", + "test_code": "let\n Test.label.deprecated \"Silence\" <| Test.expect (response \"\" === \"Fine. Be that way!\")" }, { - "test_code": "bob.test.ex19 = let\n\tTest.label \"Prolonged silence\" <| Test.expect (response \" \" === \"Fine. Be that way!\")", - "name": "bob.test.ex19" + "name": "Prolonged silence", + "test_code": "let\n Test.label.deprecated \"Prolonged silence\" <| Test.expect (response \" \" === \"Fine. Be that way!\")" }, { - "test_code": "bob.test.ex20 = let\n\tTest.label \"Alternate silence\" <| Test.expect (response \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" === \"Fine. Be that way!\")", - "name": "bob.test.ex20" + "name": "Alternate silence", + "test_code": "let\n Test.label.deprecated \"Alternate silence\" <| Test.expect (response \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\" === \"Fine. Be that way!\")" }, { - "test_code": "bob.test.ex21 = let\n\tTest.label \"Multiple line question\" <| Test.expect (response \"\\nDoes this cryogenic chamber make me look fat?\\nNo.\" === \"Whatever.\")", - "name": "bob.test.ex21" + "name": "Multiple line question", + "test_code": "let\n Test.label.deprecated \"Multiple line question\" <| Test.expect (response \"\\nDoes this cryogenic chamber make me look fat?\\nNo.\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex22 = let\n\tTest.label \"Starting with whitespace\" <| Test.expect (response \" hmmmmmmm...\" === \"Whatever.\")", - "name": "bob.test.ex22" + "name": "Starting with whitespace", + "test_code": "let\n Test.label.deprecated \"Starting with whitespace\" <| Test.expect (response \" hmmmmmmm...\" === \"Whatever.\")" }, { - "test_code": "bob.test.ex23 = let\n\tTest.label \"Ending with whitespace\" <| Test.expect (response \"Okay if like my spacebar quite a bit? \" === \"Sure.\")", - "name": "bob.test.ex23" + "name": "Ending with whitespace", + "test_code": "let\n Test.label.deprecated \"Ending with whitespace\" <| Test.expect (response \"Okay if like my spacebar quite a bit? \" === \"Sure.\")" }, { - "test_code": "bob.test.ex24 = let\n\tTest.label \"Other whitespace\" <| Test.expect (response \"\\n\\r \\t\" === \"Fine. Be that way!\")", - "name": "bob.test.ex24" + "name": "Other whitespace", + "test_code": "let\n Test.label.deprecated \"Other whitespace\" <| Test.expect (response \"\\n\\r \\t\" === \"Fine. Be that way!\")" }, { - "test_code": "bob.test.ex25 = let\n\tTest.label \"Non-question ending with whitespace\" <| Test.expect (response \"This is a statement ending with whitespace \" === \"Whatever.\")", - "name": "bob.test.ex25" + "name": "Non-question ending with whitespace", + "test_code": "let\n Test.label.deprecated \"Non-question ending with whitespace\" <| Test.expect (response \"This is a statement ending with whitespace \" === \"Whatever.\")" } -] +] \ No newline at end of file diff --git a/exercises/practice/bob/.meta/testLoader.md b/exercises/practice/bob/.meta/testLoader.md index 73fe57d..6cfb094 100644 --- a/exercises/practice/bob/.meta/testLoader.md +++ b/exercises/practice/bob/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./bob.u -.> add -.> load ./bob.test.u -.> add -.> move.term bob.tests tests +scratch/main> load ./bob.u +scratch/main> add +scratch/main> load ./bob.test.u +scratch/main> add +scratch/main> move.term bob.tests tests ``` diff --git a/exercises/practice/bob/bob.test.u b/exercises/practice/bob/bob.test.u index 3bf26f5..0a2db19 100644 --- a/exercises/practice/bob/bob.test.u +++ b/exercises/practice/bob/bob.test.u @@ -1,77 +1,77 @@ bob.test.ex1 = let - Test.label "Stating something" <| Test.expect (response "Tom-ay-to, tom-aaaah-to." === "Whatever.") + Test.label.deprecated "Stating something" <| Test.expect (response "Tom-ay-to, tom-aaaah-to." === "Whatever.") bob.test.ex2 = let - Test.label "Shouting" <| Test.expect (response "WATCH OUT!" === "Whoa, chill out!") + Test.label.deprecated "Shouting" <| Test.expect (response "WATCH OUT!" === "Whoa, chill out!") bob.test.ex3 = let - Test.label "Shouting gibberish" <| Test.expect (response "FCECDFCAAB" === "Whoa, chill out!") + Test.label.deprecated "Shouting gibberish" <| Test.expect (response "FCECDFCAAB" === "Whoa, chill out!") bob.test.ex4 = let - Test.label "Asking a question" <| Test.expect (response "Does this cryogenic chamber make me look fat?" === "Sure.") + Test.label.deprecated "Asking a question" <| Test.expect (response "Does this cryogenic chamber make me look fat?" === "Sure.") bob.test.ex5 = let - Test.label "Asking a numeric question" <| Test.expect (response "You are, what, like 15?" === "Sure.") + Test.label.deprecated "Asking a numeric question" <| Test.expect (response "You are, what, like 15?" === "Sure.") bob.test.ex6 = let - Test.label "Asking gibberish" <| Test.expect (response "fffbbcbeab?" === "Sure.") + Test.label.deprecated "Asking gibberish" <| Test.expect (response "fffbbcbeab?" === "Sure.") bob.test.ex7 = let - Test.label "Talking forcefully" <| Test.expect (response "Hi there!" === "Whatever.") + Test.label.deprecated "Talking forcefully" <| Test.expect (response "Hi there!" === "Whatever.") bob.test.ex8 = let - Test.label "Using acronyms in regular speech" <| Test.expect (response "It's OK if you don't want to go work for NASA." === "Whatever.") + Test.label.deprecated "Using acronyms in regular speech" <| Test.expect (response "It's OK if you don't want to go work for NASA." === "Whatever.") bob.test.ex9 = let - Test.label "Forceful question" <| Test.expect (response "WHAT'S GOING ON?" === "Calm down, I know what I'm doing!") + Test.label.deprecated "Forceful question" <| Test.expect (response "WHAT'S GOING ON?" === "Calm down, I know what I'm doing!") bob.test.ex10 = let - Test.label "Shouting numbers" <| Test.expect (response "1, 2, 3 GO!" === "Whoa, chill out!") + Test.label.deprecated "Shouting numbers" <| Test.expect (response "1, 2, 3 GO!" === "Whoa, chill out!") bob.test.ex11 = let - Test.label "No letters" <| Test.expect (response "1, 2, 3" === "Whatever.") + Test.label.deprecated "No letters" <| Test.expect (response "1, 2, 3" === "Whatever.") bob.test.ex12 = let - Test.label "Question with no letters" <| Test.expect (response "4?" === "Sure.") + Test.label.deprecated "Question with no letters" <| Test.expect (response "4?" === "Sure.") bob.test.ex13 = let - Test.label "Shouting with special characters" <| Test.expect (response "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!" === "Whoa, chill out!") + Test.label.deprecated "Shouting with special characters" <| Test.expect (response "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!" === "Whoa, chill out!") bob.test.ex14 = let - Test.label "Shouting with no exclamation mark" <| Test.expect (response "I HATE THE DENTIST" === "Whoa, chill out!") + Test.label.deprecated "Shouting with no exclamation mark" <| Test.expect (response "I HATE THE DENTIST" === "Whoa, chill out!") bob.test.ex15 = let - Test.label "Statement containing question mark" <| Test.expect (response "Ending with ? means a question." === "Whatever.") + Test.label.deprecated "Statement containing question mark" <| Test.expect (response "Ending with ? means a question." === "Whatever.") bob.test.ex16 = let - Test.label "Non-letters with question" <| Test.expect (response ":) ?" === "Sure.") + Test.label.deprecated "Non-letters with question" <| Test.expect (response ":) ?" === "Sure.") bob.test.ex17 = let - Test.label "Prattling on" <| Test.expect (response "Wait! Hang on. Are you going to be OK?" === "Sure.") + Test.label.deprecated "Prattling on" <| Test.expect (response "Wait! Hang on. Are you going to be OK?" === "Sure.") bob.test.ex18 = let - Test.label "Silence" <| Test.expect (response "" === "Fine. Be that way!") + Test.label.deprecated "Silence" <| Test.expect (response "" === "Fine. Be that way!") bob.test.ex19 = let - Test.label "Prolonged silence" <| Test.expect (response " " === "Fine. Be that way!") + Test.label.deprecated "Prolonged silence" <| Test.expect (response " " === "Fine. Be that way!") bob.test.ex20 = let - Test.label "Alternate silence" <| Test.expect (response "\t\t\t\t\t\t\t\t\t\t" === "Fine. Be that way!") + Test.label.deprecated "Alternate silence" <| Test.expect (response "\t\t\t\t\t\t\t\t\t\t" === "Fine. Be that way!") bob.test.ex21 = let - Test.label "Multiple line question" <| Test.expect (response "\nDoes this cryogenic chamber make me look fat?\nNo." === "Whatever.") + Test.label.deprecated "Multiple line question" <| Test.expect (response "\nDoes this cryogenic chamber make me look fat?\nNo." === "Whatever.") bob.test.ex22 = let - Test.label "Starting with whitespace" <| Test.expect (response " hmmmmmmm..." === "Whatever.") + Test.label.deprecated "Starting with whitespace" <| Test.expect (response " hmmmmmmm..." === "Whatever.") bob.test.ex23 = let - Test.label "Ending with whitespace" <| Test.expect (response "Okay if like my spacebar quite a bit? " === "Sure.") + Test.label.deprecated "Ending with whitespace" <| Test.expect (response "Okay if like my spacebar quite a bit? " === "Sure.") bob.test.ex24 = let - Test.label "Other whitespace" <| Test.expect (response "\n\r \t" === "Fine. Be that way!") + Test.label.deprecated "Other whitespace" <| Test.expect (response "\n\r \t" === "Fine. Be that way!") bob.test.ex25 = let - Test.label "Non-question ending with whitespace" <| Test.expect (response "This is a statement ending with whitespace " === "Whatever.") + Test.label.deprecated "Non-question ending with whitespace" <| Test.expect (response "This is a statement ending with whitespace " === "Whatever.") test> bob.tests = runAll [ bob.test.ex1, diff --git a/exercises/practice/bowling/.meta/examples/bowling.example.u b/exercises/practice/bowling/.meta/examples/bowling.example.u index 2bcbc20..fe08790 100644 --- a/exercises/practice/bowling/.meta/examples/bowling.example.u +++ b/exercises/practice/bowling/.meta/examples/bowling.example.u @@ -79,13 +79,13 @@ calculateFrame _ = (roll, Some next) | roll + next === 10 -> -- Spare completeFrame = Frame currentFrame [roll, next] spareScore = !Spare.calculate + 10 - base.ignore Tape.right + ignore Tape.right go (currentFrame + 1) (framesSoFar :+ completeFrame) (currentScore + spareScore) (roll, Some next) | (roll + next Nat.> 10) || (roll Nat.> 10) -> -- validate pin set Throw.throw (Error "Pin count exceeds pins on the lane") (roll, Some next) -> completeFrame = Frame currentFrame [roll, next] - base.ignore Tape.right + ignore Tape.right go (currentFrame + 1) (framesSoFar :+ completeFrame) (currentScore + roll + next) (roll, None) -> (framesSoFar, currentScore) @@ -95,17 +95,17 @@ calculateFrame _ = Strike.calculate : '{Tape Nat} Nat Strike.calculate _ = first = Tape.extract - base.ignore Tape.right + ignore Tape.right second = Tape.extract total = first + second - base.ignore Tape.left + ignore Tape.left total Spare.calculate : '{Tape Nat} Nat Spare.calculate _ = - base.ignore Tape.right + ignore Tape.right first = Tape.extract - base.ignore Tape.left + ignore Tape.left first {{ Represents a frame with a turn number a list for the rolls in the turn }} diff --git a/exercises/practice/bowling/.meta/testAnnotation.json b/exercises/practice/bowling/.meta/testAnnotation.json index 5ed8d97..b6c1849 100644 --- a/exercises/practice/bowling/.meta/testAnnotation.json +++ b/exercises/practice/bowling/.meta/testAnnotation.json @@ -1,86 +1,86 @@ [ { - "test_code":"bowling.test.ex1 = let\n\tTest.label \"should be able to score a game with all zeros\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (0))", - "name":"bowling.test.ex1" + "name": "should be able to score a game with all zeros", + "test_code": "let\n Test.label.deprecated \"should be able to score a game with all zeros\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (0))" }, { - "test_code":"bowling.test.ex2 = let\n\tTest.label \"should be able to score a game with no strikes or spares\" <| Test.expect (score [3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6] === Right (90))", - "name":"bowling.test.ex2" + "name": "should be able to score a game with no strikes or spares", + "test_code": "let\n Test.label.deprecated \"should be able to score a game with no strikes or spares\" <| Test.expect (score [3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6] === Right (90))" }, { - "test_code":"bowling.test.ex3 = let\n\tTest.label \"a spare followed by zeros is worth ten points\" <| Test.expect (score [6,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10))", - "name":"bowling.test.ex3" + "name": "a spare followed by zeros is worth ten points", + "test_code": "let\n Test.label.deprecated \"a spare followed by zeros is worth ten points\" <| Test.expect (score [6,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10))" }, { - "test_code":"bowling.test.ex4 = let\n\tTest.label \"points scored in the roll after a spare are counted twice\" <| Test.expect (score [6,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (16))", - "name":"bowling.test.ex4" + "name": "points scored in the roll after a spare are counted twice", + "test_code": "let\n Test.label.deprecated \"points scored in the roll after a spare are counted twice\" <| Test.expect (score [6,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (16))" }, { - "test_code":"bowling.test.ex5 = let\n\tTest.label \"consecutive spares each get a one roll bonus\" <| Test.expect (score [5,5,3,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (31))", - "name":"bowling.test.ex5" + "name": "consecutive spares each get a one roll bonus", + "test_code": "let\n Test.label.deprecated \"consecutive spares each get a one roll bonus\" <| Test.expect (score [5,5,3,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (31))" }, { - "test_code":"bowling.test.ex6 = let\n\tTest.label \"a spare in the last frame gets a one roll bonus that is counted once\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,7] === Right (17))", - "name":"bowling.test.ex6" + "name": "a spare in the last frame gets a one roll bonus that is counted once", + "test_code": "let\n Test.label.deprecated \"a spare in the last frame gets a one roll bonus that is counted once\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,7] === Right (17))" }, { - "test_code":"bowling.test.ex7 = let\n\tTest.label \"a strike earns ten points in a frame with a single roll\" <| Test.expect (score [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10))", - "name":"bowling.test.ex7" + "name": "a strike earns ten points in a frame with a single roll", + "test_code": "let\n Test.label.deprecated \"a strike earns ten points in a frame with a single roll\" <| Test.expect (score [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10))" }, { - "test_code":"bowling.test.ex8 = let\n\tTest.label \"points scored in the two rolls after a strike are counted twice as a bonus\" <| Test.expect (score [10,5,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (26))", - "name":"bowling.test.ex8" + "name": "points scored in the two rolls after a strike are counted twice as a bonus", + "test_code": "let\n Test.label.deprecated \"points scored in the two rolls after a strike are counted twice as a bonus\" <| Test.expect (score [10,5,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (26))" }, { - "test_code":"bowling.test.ex9 = let\n\tTest.label \"consecutive strikes each get the two roll bonus\" <| Test.expect (score [10,10,10,5,3,0,0,0,0,0,0,0,0,0,0,0,0] === Right (81))", - "name":"bowling.test.ex9" + "name": "consecutive strikes each get the two roll bonus", + "test_code": "let\n Test.label.deprecated \"consecutive strikes each get the two roll bonus\" <| Test.expect (score [10,10,10,5,3,0,0,0,0,0,0,0,0,0,0,0,0] === Right (81))" }, { - "test_code":"bowling.test.ex10 = let\n\tTest.label \"a strike in the last frame gets a two roll bonus that is counted once\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,1] === Right (18))", - "name":"bowling.test.ex10" + "name": "a strike in the last frame gets a two roll bonus that is counted once", + "test_code": "let\n Test.label.deprecated \"a strike in the last frame gets a two roll bonus that is counted once\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,1] === Right (18))" }, { - "test_code":"bowling.test.ex11 = let\n\tTest.label \"rolling a spare with the two roll bonus does not get a bonus roll\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,3] === Right (20))", - "name":"bowling.test.ex11" + "name": "rolling a spare with the two roll bonus does not get a bonus roll", + "test_code": "let\n Test.label.deprecated \"rolling a spare with the two roll bonus does not get a bonus roll\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,3] === Right (20))" }, { - "test_code":"bowling.test.ex12 = let\n\tTest.label \"strikes with the two roll bonus do not get bonus rolls\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10] === Right (30))", - "name":"bowling.test.ex12" + "name": "strikes with the two roll bonus do not get bonus rolls", + "test_code": "let\n Test.label.deprecated \"strikes with the two roll bonus do not get bonus rolls\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10] === Right (30))" }, { - "test_code":"bowling.test.ex13 = let\n\tTest.label \"last two strikes followed by only last bonus with non strike points\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,1] === Right (31))", - "name":"bowling.test.ex13" + "name": "last two strikes followed by only last bonus with non strike points", + "test_code": "let\n Test.label.deprecated \"last two strikes followed by only last bonus with non strike points\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,1] === Right (31))" }, { - "test_code":"bowling.test.ex14 = let\n\tTest.label \"a strike with the one roll bonus after a spare in the last frame does not get a bonus\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,10] === Right (20))", - "name":"bowling.test.ex14" + "name": "a strike with the one roll bonus after a spare in the last frame does not get a bonus", + "test_code": "let\n Test.label.deprecated \"a strike with the one roll bonus after a spare in the last frame does not get a bonus\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,10] === Right (20))" }, { - "test_code":"bowling.test.ex15 = let\n\tTest.label \"all strikes is a perfect game\" <| Test.expect (score [10,10,10,10,10,10,10,10,10,10,10,10] === Right (300))", - "name":"bowling.test.ex15" + "name": "all strikes is a perfect game", + "test_code": "let\n Test.label.deprecated \"all strikes is a perfect game\" <| Test.expect (score [10,10,10,10,10,10,10,10,10,10,10,10] === Right (300))" }, { - "test_code":"bowling.test.ex16 = let\n\tTest.label \"two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,6] === Right (26))", - "name":"bowling.test.ex16" + "name": "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike", + "test_code": "Test.label.deprecated \"two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,6] === Right (26))" }, { - "test_code":"bowling.test.ex17 = let\n\tTest.label \"an unstarted game cannot be scored\" <| Test.expect (score [] === Left ( Error \"Score cannot be taken until the end of the game\"))", - "name":"bowling.test.ex17" + "name": "an unstarted game cannot be scored", + "test_code": "let\n Test.label.deprecated \"an unstarted game cannot be scored\" <| Test.expect (score [] === Left ( Error \"Score cannot be taken until the end of the game\"))" }, { - "test_code":"bowling.test.ex18 = let\n\tTest.label \"an incomplete game cannot be scored\" <| Test.expect (score [0,0] === Left ( Error \"Score cannot be taken until the end of the game\"))", - "name":"bowling.test.ex18" + "name": "an incomplete game cannot be scored", + "test_code": "let\n Test.label.deprecated \"an incomplete game cannot be scored\" <| Test.expect (score [0,0] === Left ( Error \"Score cannot be taken until the end of the game\"))" }, { - "test_code":"bowling.test.ex19 = let\n\tTest.label \"bonus rolls for a strike in the last frame must be rolled before score can be calculated\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10] === Left ( Error \"Score cannot be taken until the end of the game\"))", - "name":"bowling.test.ex19" + "name": "bonus rolls for a strike in the last frame must be rolled before score can be calculated", + "test_code": "let\n Test.label.deprecated \"bonus rolls for a strike in the last frame must be rolled before score can be calculated\" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10] === Left ( Error \"Score cannot be taken until the end of the game\"))" }, { - "test_code":"bowling.test.ex20 = let\n\tTest.label \"both bonus rolls for a strike in the last frame must be rolled before score can be calculated\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10] === Left ( Error \"Score cannot be taken until the end of the game\"))", - "name":"bowling.test.ex20" + "name": "both bonus rolls for a strike in the last frame must be rolled before score can be calculated", + "test_code": "let\n Test.label.deprecated \"both bonus rolls for a strike in the last frame must be rolled before score can be calculated\" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10] === Left ( Error \"Score cannot be taken until the end of the game\"))" }, { - "test_code":"bowling.test.ex21 = let\n\tTest.label \"bonus roll for a spare in the last frame must be rolled before score can be calculated\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3] === Left ( Error \"Score cannot be taken until the end of the game\"))", - "name":"bowling.test.ex21" + "name": "bonus roll for a spare in the last frame must be rolled before score can be calculated", + "test_code": "let\n Test.label.deprecated \"bonus roll for a spare in the last frame must be rolled before score can be calculated\" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3] === Left ( Error \"Score cannot be taken until the end of the game\"))" } -] +] \ No newline at end of file diff --git a/exercises/practice/bowling/.meta/testLoader.md b/exercises/practice/bowling/.meta/testLoader.md index ca1573a..b9cb695 100644 --- a/exercises/practice/bowling/.meta/testLoader.md +++ b/exercises/practice/bowling/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./bowling.u -.> add -.> load ./bowling.test.u -.> add -.> move.term bowling.tests tests +scratch/main> load ./bowling.u +scratch/main> add +scratch/main> load ./bowling.test.u +scratch/main> add +scratch/main> move.term bowling.tests tests ``` diff --git a/exercises/practice/bowling/bowling.test.u b/exercises/practice/bowling/bowling.test.u index 4174195..c19db37 100644 --- a/exercises/practice/bowling/bowling.test.u +++ b/exercises/practice/bowling/bowling.test.u @@ -1,65 +1,65 @@ bowling.test.ex1 = let - Test.label "should be able to score a game with all zeros" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (0)) + Test.label.deprecated "should be able to score a game with all zeros" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (0)) bowling.test.ex2 = let - Test.label "should be able to score a game with no strikes or spares" <| Test.expect (score [3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6] === Right (90)) + Test.label.deprecated "should be able to score a game with no strikes or spares" <| Test.expect (score [3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6,3,6] === Right (90)) bowling.test.ex3 = let - Test.label "a spare followed by zeros is worth ten points" <| Test.expect (score [6,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10)) + Test.label.deprecated "a spare followed by zeros is worth ten points" <| Test.expect (score [6,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10)) bowling.test.ex4 = let - Test.label "points scored in the roll after a spare are counted twice" <| Test.expect (score [6,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (16)) + Test.label.deprecated "points scored in the roll after a spare are counted twice" <| Test.expect (score [6,4,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (16)) bowling.test.ex5 = let - Test.label "consecutive spares each get a one roll bonus" <| Test.expect (score [5,5,3,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (31)) + Test.label.deprecated "consecutive spares each get a one roll bonus" <| Test.expect (score [5,5,3,7,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (31)) bowling.test.ex6 = let - Test.label "a spare in the last frame gets a one roll bonus that is counted once" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,7] === Right (17)) + Test.label.deprecated "a spare in the last frame gets a one roll bonus that is counted once" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,7] === Right (17)) bowling.test.ex7 = let - Test.label "a strike earns ten points in a frame with a single roll" <| Test.expect (score [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10)) + Test.label.deprecated "a strike earns ten points in a frame with a single roll" <| Test.expect (score [10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (10)) bowling.test.ex8 = let - Test.label "points scored in the two rolls after a strike are counted twice as a bonus" <| Test.expect (score [10,5,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (26)) + Test.label.deprecated "points scored in the two rolls after a strike are counted twice as a bonus" <| Test.expect (score [10,5,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] === Right (26)) bowling.test.ex9 = let - Test.label "consecutive strikes each get the two roll bonus" <| Test.expect (score [10,10,10,5,3,0,0,0,0,0,0,0,0,0,0,0,0] === Right (81)) + Test.label.deprecated "consecutive strikes each get the two roll bonus" <| Test.expect (score [10,10,10,5,3,0,0,0,0,0,0,0,0,0,0,0,0] === Right (81)) bowling.test.ex10 = let - Test.label "a strike in the last frame gets a two roll bonus that is counted once" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,1] === Right (18)) + Test.label.deprecated "a strike in the last frame gets a two roll bonus that is counted once" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,1] === Right (18)) bowling.test.ex11 = let - Test.label "rolling a spare with the two roll bonus does not get a bonus roll" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,3] === Right (20)) + Test.label.deprecated "rolling a spare with the two roll bonus does not get a bonus roll" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,7,3] === Right (20)) bowling.test.ex12 = let - Test.label "strikes with the two roll bonus do not get bonus rolls" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10] === Right (30)) + Test.label.deprecated "strikes with the two roll bonus do not get bonus rolls" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10] === Right (30)) bowling.test.ex13 = let - Test.label "last two strikes followed by only last bonus with non strike points" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,1] === Right (31)) + Test.label.deprecated "last two strikes followed by only last bonus with non strike points" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,1] === Right (31)) bowling.test.ex14 = let - Test.label "a strike with the one roll bonus after a spare in the last frame does not get a bonus" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,10] === Right (20)) + Test.label.deprecated "a strike with the one roll bonus after a spare in the last frame does not get a bonus" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3,10] === Right (20)) bowling.test.ex15 = let - Test.label "all strikes is a perfect game" <| Test.expect (score [10,10,10,10,10,10,10,10,10,10,10,10] === Right (300)) + Test.label.deprecated "all strikes is a perfect game" <| Test.expect (score [10,10,10,10,10,10,10,10,10,10,10,10] === Right (300)) bowling.test.ex16 = - Test.label "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,6] === Right (26)) + Test.label.deprecated "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,6] === Right (26)) bowling.test.ex17 = let - Test.label "an unstarted game cannot be scored" <| Test.expect (score [] === Left ( Error "Score cannot be taken until the end of the game")) + Test.label.deprecated "an unstarted game cannot be scored" <| Test.expect (score [] === Left ( Error "Score cannot be taken until the end of the game")) bowling.test.ex18 = let - Test.label "an incomplete game cannot be scored" <| Test.expect (score [0,0] === Left ( Error "Score cannot be taken until the end of the game")) + Test.label.deprecated "an incomplete game cannot be scored" <| Test.expect (score [0,0] === Left ( Error "Score cannot be taken until the end of the game")) bowling.test.ex19 = let - Test.label "bonus rolls for a strike in the last frame must be rolled before score can be calculated" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10] === Left ( Error "Score cannot be taken until the end of the game")) + Test.label.deprecated "bonus rolls for a strike in the last frame must be rolled before score can be calculated" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10] === Left ( Error "Score cannot be taken until the end of the game")) bowling.test.ex20 = let - Test.label "both bonus rolls for a strike in the last frame must be rolled before score can be calculated" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10] === Left ( Error "Score cannot be taken until the end of the game")) + Test.label.deprecated "both bonus rolls for a strike in the last frame must be rolled before score can be calculated" <| Test.expect ( score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10] === Left ( Error "Score cannot be taken until the end of the game")) bowling.test.ex21 = let - Test.label "bonus roll for a spare in the last frame must be rolled before score can be calculated" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3] === Left ( Error "Score cannot be taken until the end of the game")) + Test.label.deprecated "bonus roll for a spare in the last frame must be rolled before score can be calculated" <| Test.expect (score [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,3] === Left ( Error "Score cannot be taken until the end of the game")) test> bowling.tests = runAll [ bowling.test.ex1, diff --git a/exercises/practice/change/.meta/testAnnotation.json b/exercises/practice/change/.meta/testAnnotation.json index 3d4c013..2b788eb 100644 --- a/exercises/practice/change/.meta/testAnnotation.json +++ b/exercises/practice/change/.meta/testAnnotation.json @@ -1,46 +1,46 @@ [ { - "test_code": "change.test.ex1 = let\n\tTest.label \"change for 1 cent\" <| Test.expect (findFewestCoins [1,5,10,25], 1 === Some [1])", - "name": "change.test.ex1" + "name": "change for 1 cent", + "test_code": "let\n Test.label.deprecated \"change for 1 cent\" <| Test.expect (findFewestCoins [1,5,10,25] 1 === Some [1])" }, { - "test_code": "change.test.ex2 = let\n\tTest.label \"single coin change\" <| Test.expect (findFewestCoins [1,5,10,25,100], 25 === Some [25])", - "name": "change.test.ex2" + "name": "single coin change", + "test_code": "let\n Test.label.deprecated \"single coin change\" <| Test.expect (findFewestCoins [1,5,10,25,100] 25 === Some [25])" }, { - "test_code": "change.test.ex3 = let\n\tTest.label \"multiple coin change\" <| Test.expect (findFewestCoins [1,5,10,25,100], 15 === Some [5,10])", - "name": "change.test.ex3" + "name": "multiple coin change", + "test_code": "let\n Test.label.deprecated \"multiple coin change\" <| Test.expect (findFewestCoins [1,5,10,25,100] 15 === Some [5,10])" }, { - "test_code": "change.test.ex4 = let\n\tTest.label \"change with Lilliputian Coins\" <| Test.expect (findFewestCoins [1,4,15,20,50], 23 === Some [4,4,15])", - "name": "change.test.ex4" + "name": "change with Lilliputian Coins", + "test_code": "let\n Test.label.deprecated \"change with Lilliputian Coins\" <| Test.expect (findFewestCoins [1,4,15,20,50] 23 === Some [4,4,15])" }, { - "test_code": "change.test.ex5 = let\n\tTest.label \"change with Lower Elbonia Coins\" <| Test.expect (findFewestCoins [1,5,10,21,25], 63 === Some [21,21,21])", - "name": "change.test.ex5" + "name": "change with Lower Elbonia Coins", + "test_code": "let\n Test.label.deprecated \"change with Lower Elbonia Coins\" <| Test.expect (findFewestCoins [1,5,10,21,25] 63 === Some [21,21,21])" }, { - "test_code": "change.test.ex6 = let\n\tTest.label \"large target values\" <| Test.expect (findFewestCoins [1,2,5,10,20,50,100], 999 === Some [2,2,5,20,20,50,100,100,100,100,100,100,100,100,100])", - "name": "change.test.ex6" + "name": "large target values", + "test_code": "let\n Test.label.deprecated \"large target values\" <| Test.expect (findFewestCoins [1,2,5,10,20,50,100] 999 === Some [2,2,5,20,20,50,100,100,100,100,100,100,100,100,100])" }, { - "test_code": "change.test.ex7 = let\n\tTest.label \"possible change without unit coins available\" <| Test.expect (findFewestCoins [2,5,10,20,50], 21 === Some [2,2,2,5,10])", - "name": "change.test.ex7" + "name": "possible change without unit coins available", + "test_code": "let\n Test.label.deprecated \"possible change without unit coins available\" <| Test.expect (findFewestCoins [2,5,10,20,50] 21 === Some [2,2,2,5,10])" }, { - "test_code": "change.test.ex8 = let\n\tTest.label \"another possible change without unit coins available\" <| Test.expect (findFewestCoins [4,5], 27 === Some [4,4,4,5,5,5])", - "name": "change.test.ex8" + "name": "another possible change without unit coins available", + "test_code": "let\n Test.label.deprecated \"another possible change without unit coins available\" <| Test.expect (findFewestCoins [4,5] 27 === Some [4,4,4,5,5,5])" }, { - "test_code": "change.test.ex9 = let\n\tTest.label \"no coins make 0 change\" <| Test.expect (findFewestCoins [1,5,10,21,25], 0 === Some [])", - "name": "change.test.ex9" + "name": "no coins make 0 change", + "test_code": "let\n Test.label.deprecated \"no coins make 0 change\" <| Test.expect (findFewestCoins [1,5,10,21,25] 0 === Some [])" }, { - "test_code": "change.test.ex10 = let\n\tTest.label \"error testing for change smaller than the smallest of coins\" <| Test.expect (findFewestCoins [5,10], 3 === None)", - "name": "change.test.ex10" + "name": "error testing for change smaller than the smallest of coins", + "test_code": "let\n Test.label.deprecated \"error testing for change smaller than the smallest of coins\" <| Test.expect (findFewestCoins [5,10] 3 === None)" }, { - "test_code": "change.test.ex11 = let\n\tTest.label \"error if no combination can add up to target\" <| Test.expect (findFewestCoins [5,10], 94 === None)", - "name": "change.test.ex11" + "name": "error if no combination can add up to target", + "test_code": "let\n Test.label.deprecated \"error if no combination can add up to target\" <| Test.expect (findFewestCoins [5,10] 94 === None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/change/.meta/testLoader.md b/exercises/practice/change/.meta/testLoader.md index 52c52ee..7bab013 100644 --- a/exercises/practice/change/.meta/testLoader.md +++ b/exercises/practice/change/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./change.u -.> add -.> load ./change.test.u -.> add -.> move.term change.tests tests +scratch/main> load ./change.u +scratch/main> add +scratch/main> load ./change.test.u +scratch/main> add +scratch/main> move.term change.tests tests ``` diff --git a/exercises/practice/change/change.test.u b/exercises/practice/change/change.test.u index 2d4d918..a5caa2e 100644 --- a/exercises/practice/change/change.test.u +++ b/exercises/practice/change/change.test.u @@ -1,35 +1,35 @@ change.test.ex1 = let - Test.label "change for 1 cent" <| Test.expect (findFewestCoins [1,5,10,25] 1 === Some [1]) + Test.label.deprecated "change for 1 cent" <| Test.expect (findFewestCoins [1,5,10,25] 1 === Some [1]) change.test.ex2 = let - Test.label "single coin change" <| Test.expect (findFewestCoins [1,5,10,25,100] 25 === Some [25]) + Test.label.deprecated "single coin change" <| Test.expect (findFewestCoins [1,5,10,25,100] 25 === Some [25]) change.test.ex3 = let - Test.label "multiple coin change" <| Test.expect (findFewestCoins [1,5,10,25,100] 15 === Some [5,10]) + Test.label.deprecated "multiple coin change" <| Test.expect (findFewestCoins [1,5,10,25,100] 15 === Some [5,10]) change.test.ex4 = let - Test.label "change with Lilliputian Coins" <| Test.expect (findFewestCoins [1,4,15,20,50] 23 === Some [4,4,15]) + Test.label.deprecated "change with Lilliputian Coins" <| Test.expect (findFewestCoins [1,4,15,20,50] 23 === Some [4,4,15]) change.test.ex5 = let - Test.label "change with Lower Elbonia Coins" <| Test.expect (findFewestCoins [1,5,10,21,25] 63 === Some [21,21,21]) + Test.label.deprecated "change with Lower Elbonia Coins" <| Test.expect (findFewestCoins [1,5,10,21,25] 63 === Some [21,21,21]) change.test.ex6 = let - Test.label "large target values" <| Test.expect (findFewestCoins [1,2,5,10,20,50,100] 999 === Some [2,2,5,20,20,50,100,100,100,100,100,100,100,100,100]) + Test.label.deprecated "large target values" <| Test.expect (findFewestCoins [1,2,5,10,20,50,100] 999 === Some [2,2,5,20,20,50,100,100,100,100,100,100,100,100,100]) change.test.ex7 = let - Test.label "possible change without unit coins available" <| Test.expect (findFewestCoins [2,5,10,20,50] 21 === Some [2,2,2,5,10]) + Test.label.deprecated "possible change without unit coins available" <| Test.expect (findFewestCoins [2,5,10,20,50] 21 === Some [2,2,2,5,10]) change.test.ex8 = let - Test.label "another possible change without unit coins available" <| Test.expect (findFewestCoins [4,5] 27 === Some [4,4,4,5,5,5]) + Test.label.deprecated "another possible change without unit coins available" <| Test.expect (findFewestCoins [4,5] 27 === Some [4,4,4,5,5,5]) change.test.ex9 = let - Test.label "no coins make 0 change" <| Test.expect (findFewestCoins [1,5,10,21,25] 0 === Some []) + Test.label.deprecated "no coins make 0 change" <| Test.expect (findFewestCoins [1,5,10,21,25] 0 === Some []) change.test.ex10 = let - Test.label "error testing for change smaller than the smallest of coins" <| Test.expect (findFewestCoins [5,10] 3 === None) + Test.label.deprecated "error testing for change smaller than the smallest of coins" <| Test.expect (findFewestCoins [5,10] 3 === None) change.test.ex11 = let - Test.label "error if no combination can add up to target" <| Test.expect (findFewestCoins [5,10] 94 === None) + Test.label.deprecated "error if no combination can add up to target" <| Test.expect (findFewestCoins [5,10] 94 === None) test> change.tests = runAll [ change.test.ex1, diff --git a/exercises/practice/clock/.meta/testAnnotation.json b/exercises/practice/clock/.meta/testAnnotation.json index b574943..e9f1420 100644 --- a/exercises/practice/clock/.meta/testAnnotation.json +++ b/exercises/practice/clock/.meta/testAnnotation.json @@ -1,105 +1,210 @@ [ -{"name":"clock.test.ex1","test_code":"clock.test.ex1 = let\n\tTest.label \"Create a new clock with an initial time, on the hour\" <| Test.expect (create +8 +0 === \"08:00\")"}, - -{"name":"clock.test.ex2","test_code":"clock.test.ex2 = let\n\tTest.label \"Create a new clock with an initial time, past the hour\" <| Test.expect (create +11 +9 === \"11:09\")"}, - -{"name":"clock.test.ex3","test_code":"clock.test.ex3 = let\n\tTest.label \"Create a new clock with an initial time, midnight is zero hours\" <| Test.expect (create +24 +0 === \"00:00\")"}, - -{"name":"clock.test.ex4","test_code":"clock.test.ex4 = let\n\tTest.label \"Create a new clock with an initial time, hour rolls over\" <| Test.expect (create +25 +0 === \"01:00\")"}, - -{"name":"clock.test.ex5","test_code":"clock.test.ex5 = let\n\tTest.label \"Create a new clock with an initial time, hour rolls over continuously\" <| Test.expect (create +100 +0 === \"04:00\")"}, - -{"name":"clock.test.ex6","test_code":"clock.test.ex6 = let\n\tTest.label \"Create a new clock with an initial time, sixty minutes is next hour\" <| Test.expect (create +1 +60 === \"02:00\")"}, - -{"name":"clock.test.ex7","test_code":"clock.test.ex7 = let\n\tTest.label \"Create a new clock with an initial time, minutes roll over\" <| Test.expect (create +0 +160 === \"02:40\")"}, - -{"name":"clock.test.ex8","test_code":"clock.test.ex8 = let\n\tTest.label \"Create a new clock with an initial time, minutes roll over continuously\" <| Test.expect (create +0 +1723 === \"04:43\")"}, - -{"name":"clock.test.ex9","test_code":"clock.test.ex9 = let\n\tTest.label \"Create a new clock with an initial time, hour and minutes roll over\" <| Test.expect (create +25 +160 === \"03:40\")"}, - -{"name":"clock.test.ex10","test_code":"clock.test.ex10 = let\n\tTest.label \"Create a new clock with an initial time, hour and minutes roll over continuously\" <| Test.expect (create +201 +3001 === \"11:01\")"}, - -{"name":"clock.test.ex11","test_code":"clock.test.ex11 = let\n\tTest.label \"Create a new clock with an initial time, hour and minutes roll over to exactly midnight\" <| Test.expect (create +72 +8640 === \"00:00\")"}, - -{"name":"clock.test.ex12","test_code":"clock.test.ex12 = let\n\tTest.label \"Create a new clock with an initial time, negative hour\" <| Test.expect (create -1 +15 === \"23:15\")"}, - -{"name":"clock.test.ex13","test_code":"clock.test.ex13 = let\n\tTest.label \"Create a new clock with an initial time, negative hour rolls over\" <| Test.expect (create -25 +0 === \"23:00\")"}, - -{"name":"clock.test.ex14","test_code":"clock.test.ex14 = let\n\tTest.label \"Create a new clock with an initial time, negative hour rolls over continuously\" <| Test.expect (create -91 +0 === \"05:00\")"}, - -{"name":"clock.test.ex15","test_code":"clock.test.ex15 = let\n\tTest.label \"Create a new clock with an initial time, negative minutes\" <| Test.expect (create +1 -40 === \"00:20\")"}, - -{"name":"clock.test.ex16","test_code":"clock.test.ex16 = let\n\tTest.label \"Create a new clock with an initial time, negative minutes roll over\" <| Test.expect (create +1 -160 === \"22:20\")"}, - -{"name":"clock.test.ex17","test_code":"clock.test.ex17 = let\n\tTest.label \"Create a new clock with an initial time, negative minutes roll over continuously\" <| Test.expect (create +1 -4820 === \"16:40\")"}, - -{"name":"clock.test.ex18","test_code":"clock.test.ex18 = let\n\tTest.label \"Create a new clock with an initial time, negative sixty minutes is previous hour\" <| Test.expect (create +2 -60 === \"01:00\")"}, - -{"name":"clock.test.ex19","test_code":"clock.test.ex19 = let\n\tTest.label \"Create a new clock with an initial time, negative hour and minutes both roll over\" <| Test.expect (create -25 -160 === \"20:20\")"}, - -{"name":"clock.test.ex20","test_code":"clock.test.ex20 = let\n\tTest.label \"Create a new clock with an initial time, negative hour and minutes both roll over continuously\" <| Test.expect (create -121 -5810 === \"22:10\")"}, - -{"name":"clock.test.ex21","test_code":"clock.test.ex21 = let\n\tTest.label \"Add minutes, add minutes\" <| Test.expect (add +10 +0 +3 === \"10:03\")"}, - -{"name":"clock.test.ex22","test_code":"clock.test.ex22 = let\n\tTest.label \"Add minutes, add no minutes\" <| Test.expect (add +6 +41 +0 === \"06:41\")"}, - -{"name":"clock.test.ex23","test_code":"clock.test.ex23 = let\n\tTest.label \"Add minutes, add to next hour\" <| Test.expect (add +0 +45 +40 === \"01:25\")"}, - -{"name":"clock.test.ex24","test_code":"clock.test.ex24 = let\n\tTest.label \"Add minutes, add more than one hour\" <| Test.expect (add +10 +0 +61 === \"11:01\")"}, - -{"name":"clock.test.ex25","test_code":"clock.test.ex25 = let\n\tTest.label \"Add minutes, add more than two hours with carry\" <| Test.expect (add +0 +45 +160 === \"03:25\")"}, - -{"name":"clock.test.ex26","test_code":"clock.test.ex26 = let\n\tTest.label \"Add minutes, add across midnight\" <| Test.expect (add +23 +59 +2 === \"00:01\")"}, - -{"name":"clock.test.ex27","test_code":"clock.test.ex27 = let\n\tTest.label \"Add minutes, add more than one day (1500 min = 25 hrs)\" <| Test.expect (add +5 +32 +1500 === \"06:32\")"}, - -{"name":"clock.test.ex28","test_code":"clock.test.ex28 = let\n\tTest.label \"Add minutes, add more than two days\" <| Test.expect (add +1 +1 +3500 === \"11:21\")"}, - -{"name":"clock.test.ex29","test_code":"clock.test.ex29 = let\n\tTest.label \"Subtract minutes, subtract minutes\" <| Test.expect (subtract +10 +3 +3 === \"10:00\")"}, - -{"name":"clock.test.ex30","test_code":"clock.test.ex30 = let\n\tTest.label \"Subtract minutes, subtract to previous hour\" <| Test.expect (subtract +10 +3 +30 === \"09:33\")"}, - -{"name":"clock.test.ex31","test_code":"clock.test.ex31 = let\n\tTest.label \"Subtract minutes, subtract more than an hour\" <| Test.expect (subtract +10 +3 +70 === \"08:53\")"}, - -{"name":"clock.test.ex32","test_code":"clock.test.ex32 = let\n\tTest.label \"Subtract minutes, subtract across midnight\" <| Test.expect (subtract +0 +3 +4 === \"23:59\")"}, - -{"name":"clock.test.ex33","test_code":"clock.test.ex33 = let\n\tTest.label \"Subtract minutes, subtract more than two hours\" <| Test.expect (subtract +0 +0 +160 === \"21:20\")"}, - -{"name":"clock.test.ex34","test_code":"clock.test.ex34 = let\n\tTest.label \"Subtract minutes, subtract more than two hours with borrow\" <| Test.expect (subtract +6 +15 +160 === \"03:35\")"}, - -{"name":"clock.test.ex35","test_code":"clock.test.ex35 = let\n\tTest.label \"Subtract minutes, subtract more than one day (1500 min = 25 hrs)\" <| Test.expect (subtract +5 +32 +1500 === \"04:32\")"}, - -{"name":"clock.test.ex36","test_code":"clock.test.ex36 = let\n\tTest.label \"Subtract minutes, subtract more than two days\" <| Test.expect (subtract +2 +20 +3000 === \"00:20\")"}, - -{"name":"clock.test.ex37","test_code":"clock.test.ex37 = let\n\tTest.label \"Compare two clocks for equality, clocks with same time\" <| Test.expect (equal (+15, +37) (+15, +37) === true)"}, - -{"name":"clock.test.ex38","test_code":"clock.test.ex38 = let\n\tTest.label \"Compare two clocks for equality, clocks a minute apart\" <| Test.expect (equal (+15, +36) (+15, +37) === false)"}, - -{"name":"clock.test.ex39","test_code":"clock.test.ex39 = let\n\tTest.label \"Compare two clocks for equality, clocks an hour apart\" <| Test.expect (equal (+14, +37) (+15, +37) === false)"}, - -{"name":"clock.test.ex40","test_code":"clock.test.ex40 = let\n\tTest.label \"Compare two clocks for equality, clocks with hour overflow\" <| Test.expect (equal (+10, +37) (+34, +37) === true)"}, - -{"name":"clock.test.ex41","test_code":"clock.test.ex41 = let\n\tTest.label \"Compare two clocks for equality, clocks with hour overflow by several days\" <| Test.expect (equal (+3, +11) (+99, +11) === true)"}, - -{"name":"clock.test.ex42","test_code":"clock.test.ex42 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative hour\" <| Test.expect (equal (+22, +40) (-2, +40) === true)"}, - -{"name":"clock.test.ex43","test_code":"clock.test.ex43 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative hour that wraps\" <| Test.expect (equal (+17, +3) (-31, +3) === true)"}, - -{"name":"clock.test.ex44","test_code":"clock.test.ex44 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative hour that wraps multiple times\" <| Test.expect (equal (+13, +49) (-83, +49) === true)"}, - -{"name":"clock.test.ex45","test_code":"clock.test.ex45 = let\n\tTest.label \"Compare two clocks for equality, clocks with minute overflow\" <| Test.expect (equal (+0, +1) (+0, +1441) === true)"}, - -{"name":"clock.test.ex46","test_code":"clock.test.ex46 = let\n\tTest.label \"Compare two clocks for equality, clocks with minute overflow by several days\" <| Test.expect (equal (+2, +2) (+2, +4322) === true)"}, - -{"name":"clock.test.ex47","test_code":"clock.test.ex47 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative minute\" <| Test.expect (equal (+2, +40) (+3, -20) === true)"}, - -{"name":"clock.test.ex48","test_code":"clock.test.ex48 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative minute that wraps\" <| Test.expect (equal (+4, +10) (+5, -1490) === true)"}, - -{"name":"clock.test.ex49","test_code":"clock.test.ex49 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative minute that wraps multiple times\" <| Test.expect (equal (+6, +15) (+6, -4305) === true)"}, - -{"name":"clock.test.ex50","test_code":"clock.test.ex50 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative hours and minutes\" <| Test.expect (equal (+7, +32) (-12, -268) === true)"}, - -{"name":"clock.test.ex51","test_code":"clock.test.ex51 = let\n\tTest.label \"Compare two clocks for equality, clocks with negative hours and minutes that wrap\" <| Test.expect (equal (+18, +7) (-54, -11513) === true)"}, - -{"name":"clock.test.ex52","test_code":"clock.test.ex52 = let\n\tTest.label \"Compare two clocks for equality, full clock and zeroed clock\" <| Test.expect (equal (+24, +0) (+0, +0) === true)"} -] + { + "name": "Create a new clock with an initial time, on the hour", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, on the hour\" <| Test.expect (create +8 +0 === \"08:00\")" + }, + { + "name": "Create a new clock with an initial time, past the hour", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, past the hour\" <| Test.expect (create +11 +9 === \"11:09\")" + }, + { + "name": "Create a new clock with an initial time, midnight is zero hours", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, midnight is zero hours\" <| Test.expect (create +24 +0 === \"00:00\")" + }, + { + "name": "Create a new clock with an initial time, hour rolls over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, hour rolls over\" <| Test.expect (create +25 +0 === \"01:00\")" + }, + { + "name": "Create a new clock with an initial time, hour rolls over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, hour rolls over continuously\" <| Test.expect (create +100 +0 === \"04:00\")" + }, + { + "name": "Create a new clock with an initial time, sixty minutes is next hour", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, sixty minutes is next hour\" <| Test.expect (create +1 +60 === \"02:00\")" + }, + { + "name": "Create a new clock with an initial time, minutes roll over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, minutes roll over\" <| Test.expect (create +0 +160 === \"02:40\")" + }, + { + "name": "Create a new clock with an initial time, minutes roll over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, minutes roll over continuously\" <| Test.expect (create +0 +1723 === \"04:43\")" + }, + { + "name": "Create a new clock with an initial time, hour and minutes roll over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, hour and minutes roll over\" <| Test.expect (create +25 +160 === \"03:40\")" + }, + { + "name": "Create a new clock with an initial time, hour and minutes roll over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, hour and minutes roll over continuously\" <| Test.expect (create +201 +3001 === \"11:01\")" + }, + { + "name": "Create a new clock with an initial time, hour and minutes roll over to exactly midnight", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, hour and minutes roll over to exactly midnight\" <| Test.expect (create +72 +8640 === \"00:00\")" + }, + { + "name": "Create a new clock with an initial time, negative hour", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative hour\" <| Test.expect (create -1 +15 === \"23:15\")" + }, + { + "name": "Create a new clock with an initial time, negative hour rolls over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative hour rolls over\" <| Test.expect (create -25 +0 === \"23:00\")" + }, + { + "name": "Create a new clock with an initial time, negative hour rolls over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative hour rolls over continuously\" <| Test.expect (create -91 +0 === \"05:00\")" + }, + { + "name": "Create a new clock with an initial time, negative minutes", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative minutes\" <| Test.expect (create +1 -40 === \"00:20\")" + }, + { + "name": "Create a new clock with an initial time, negative minutes roll over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative minutes roll over\" <| Test.expect (create +1 -160 === \"22:20\")" + }, + { + "name": "Create a new clock with an initial time, negative minutes roll over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative minutes roll over continuously\" <| Test.expect (create +1 -4820 === \"16:40\")" + }, + { + "name": "Create a new clock with an initial time, negative sixty minutes is previous hour", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative sixty minutes is previous hour\" <| Test.expect (create +2 -60 === \"01:00\")" + }, + { + "name": "Create a new clock with an initial time, negative hour and minutes both roll over", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative hour and minutes both roll over\" <| Test.expect (create -25 -160 === \"20:20\")" + }, + { + "name": "Create a new clock with an initial time, negative hour and minutes both roll over continuously", + "test_code": "let\n Test.label.deprecated \"Create a new clock with an initial time, negative hour and minutes both roll over continuously\" <| Test.expect (create -121 -5810 === \"22:10\")" + }, + { + "name": "Add minutes, add minutes", + "test_code": "let\n Test.label.deprecated \"Add minutes, add minutes\" <| Test.expect (add +10 +0 +3 === \"10:03\")" + }, + { + "name": "Add minutes, add no minutes", + "test_code": "let\n Test.label.deprecated \"Add minutes, add no minutes\" <| Test.expect (add +6 +41 +0 === \"06:41\")" + }, + { + "name": "Add minutes, add to next hour", + "test_code": "let\n Test.label.deprecated \"Add minutes, add to next hour\" <| Test.expect (add +0 +45 +40 === \"01:25\")" + }, + { + "name": "Add minutes, add more than one hour", + "test_code": "let\n Test.label.deprecated \"Add minutes, add more than one hour\" <| Test.expect (add +10 +0 +61 === \"11:01\")" + }, + { + "name": "Add minutes, add more than two hours with carry", + "test_code": "let\n Test.label.deprecated \"Add minutes, add more than two hours with carry\" <| Test.expect (add +0 +45 +160 === \"03:25\")" + }, + { + "name": "Add minutes, add across midnight", + "test_code": "let\n Test.label.deprecated \"Add minutes, add across midnight\" <| Test.expect (add +23 +59 +2 === \"00:01\")" + }, + { + "name": "Add minutes, add more than one day (1500 min = 25 hrs)", + "test_code": "let\n Test.label.deprecated \"Add minutes, add more than one day (1500 min = 25 hrs)\" <| Test.expect (add +5 +32 +1500 === \"06:32\")" + }, + { + "name": "Add minutes, add more than two days", + "test_code": "let\n Test.label.deprecated \"Add minutes, add more than two days\" <| Test.expect (add +1 +1 +3500 === \"11:21\")" + }, + { + "name": "Subtract minutes, subtract minutes", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract minutes\" <| Test.expect (subtract +10 +3 +3 === \"10:00\")" + }, + { + "name": "Subtract minutes, subtract to previous hour", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract to previous hour\" <| Test.expect (subtract +10 +3 +30 === \"09:33\")" + }, + { + "name": "Subtract minutes, subtract more than an hour", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract more than an hour\" <| Test.expect (subtract +10 +3 +70 === \"08:53\")" + }, + { + "name": "Subtract minutes, subtract across midnight", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract across midnight\" <| Test.expect (subtract +0 +3 +4 === \"23:59\")" + }, + { + "name": "Subtract minutes, subtract more than two hours", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract more than two hours\" <| Test.expect (subtract +0 +0 +160 === \"21:20\")" + }, + { + "name": "Subtract minutes, subtract more than two hours with borrow", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract more than two hours with borrow\" <| Test.expect (subtract +6 +15 +160 === \"03:35\")" + }, + { + "name": "Subtract minutes, subtract more than one day (1500 min = 25 hrs)", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract more than one day (1500 min = 25 hrs)\" <| Test.expect (subtract +5 +32 +1500 === \"04:32\")" + }, + { + "name": "Subtract minutes, subtract more than two days", + "test_code": "let\n Test.label.deprecated \"Subtract minutes, subtract more than two days\" <| Test.expect (subtract +2 +20 +3000 === \"00:20\")" + }, + { + "name": "Compare two clocks for equality, clocks with same time", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with same time\" <| Test.expect (equal (+15, +37) (+15, +37) === true)" + }, + { + "name": "Compare two clocks for equality, clocks a minute apart", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks a minute apart\" <| Test.expect (equal (+15, +36) (+15, +37) === false)" + }, + { + "name": "Compare two clocks for equality, clocks an hour apart", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks an hour apart\" <| Test.expect (equal (+14, +37) (+15, +37) === false)" + }, + { + "name": "Compare two clocks for equality, clocks with hour overflow", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with hour overflow\" <| Test.expect (equal (+10, +37) (+34, +37) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with hour overflow by several days", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with hour overflow by several days\" <| Test.expect (equal (+3, +11) (+99, +11) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative hour", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative hour\" <| Test.expect (equal (+22, +40) (-2, +40) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative hour that wraps", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative hour that wraps\" <| Test.expect (equal (+17, +3) (-31, +3) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative hour that wraps multiple times", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative hour that wraps multiple times\" <| Test.expect (equal (+13, +49) (-83, +49) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with minute overflow", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with minute overflow\" <| Test.expect (equal (+0, +1) (+0, +1441) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with minute overflow by several days", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with minute overflow by several days\" <| Test.expect (equal (+2, +2) (+2, +4322) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative minute", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative minute\" <| Test.expect (equal (+2, +40) (+3, -20) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative minute that wraps", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative minute that wraps\" <| Test.expect (equal (+4, +10) (+5, -1490) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative minute that wraps multiple times", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative minute that wraps multiple times\" <| Test.expect (equal (+6, +15) (+6, -4305) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative hours and minutes", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative hours and minutes\" <| Test.expect (equal (+7, +32) (-12, -268) === true)" + }, + { + "name": "Compare two clocks for equality, clocks with negative hours and minutes that wrap", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, clocks with negative hours and minutes that wrap\" <| Test.expect (equal (+18, +7) (-54, -11513) === true)" + }, + { + "name": "Compare two clocks for equality, full clock and zeroed clock", + "test_code": "let\n Test.label.deprecated \"Compare two clocks for equality, full clock and zeroed clock\" <| Test.expect (equal (+24, +0) (+0, +0) === true)" + } +] \ No newline at end of file diff --git a/exercises/practice/clock/.meta/testLoader.md b/exercises/practice/clock/.meta/testLoader.md index 2af55de..9527506 100644 --- a/exercises/practice/clock/.meta/testLoader.md +++ b/exercises/practice/clock/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./clock.u -.> add -.> load ./clock.test.u -.> add -.> move.term clock.tests tests +scratch/main> load ./clock.u +scratch/main> add +scratch/main> load ./clock.test.u +scratch/main> add +scratch/main> move.term clock.tests tests ``` diff --git a/exercises/practice/clock/clock.test.u b/exercises/practice/clock/clock.test.u index c76cb83..7ed5e1b 100644 --- a/exercises/practice/clock/clock.test.u +++ b/exercises/practice/clock/clock.test.u @@ -1,158 +1,158 @@ clock.test.ex1 = let - Test.label "Create a new clock with an initial time, on the hour" <| Test.expect (create +8 +0 === "08:00") + Test.label.deprecated "Create a new clock with an initial time, on the hour" <| Test.expect (create +8 +0 === "08:00") clock.test.ex2 = let - Test.label "Create a new clock with an initial time, past the hour" <| Test.expect (create +11 +9 === "11:09") + Test.label.deprecated "Create a new clock with an initial time, past the hour" <| Test.expect (create +11 +9 === "11:09") clock.test.ex3 = let - Test.label "Create a new clock with an initial time, midnight is zero hours" <| Test.expect (create +24 +0 === "00:00") + Test.label.deprecated "Create a new clock with an initial time, midnight is zero hours" <| Test.expect (create +24 +0 === "00:00") clock.test.ex4 = let - Test.label "Create a new clock with an initial time, hour rolls over" <| Test.expect (create +25 +0 === "01:00") + Test.label.deprecated "Create a new clock with an initial time, hour rolls over" <| Test.expect (create +25 +0 === "01:00") clock.test.ex5 = let - Test.label "Create a new clock with an initial time, hour rolls over continuously" <| Test.expect (create +100 +0 === "04:00") + Test.label.deprecated "Create a new clock with an initial time, hour rolls over continuously" <| Test.expect (create +100 +0 === "04:00") clock.test.ex6 = let - Test.label "Create a new clock with an initial time, sixty minutes is next hour" <| Test.expect (create +1 +60 === "02:00") + Test.label.deprecated "Create a new clock with an initial time, sixty minutes is next hour" <| Test.expect (create +1 +60 === "02:00") clock.test.ex7 = let - Test.label "Create a new clock with an initial time, minutes roll over" <| Test.expect (create +0 +160 === "02:40") + Test.label.deprecated "Create a new clock with an initial time, minutes roll over" <| Test.expect (create +0 +160 === "02:40") clock.test.ex8 = let - Test.label "Create a new clock with an initial time, minutes roll over continuously" <| Test.expect (create +0 +1723 === "04:43") + Test.label.deprecated "Create a new clock with an initial time, minutes roll over continuously" <| Test.expect (create +0 +1723 === "04:43") clock.test.ex9 = let - Test.label "Create a new clock with an initial time, hour and minutes roll over" <| Test.expect (create +25 +160 === "03:40") + Test.label.deprecated "Create a new clock with an initial time, hour and minutes roll over" <| Test.expect (create +25 +160 === "03:40") clock.test.ex10 = let - Test.label "Create a new clock with an initial time, hour and minutes roll over continuously" <| Test.expect (create +201 +3001 === "11:01") + Test.label.deprecated "Create a new clock with an initial time, hour and minutes roll over continuously" <| Test.expect (create +201 +3001 === "11:01") clock.test.ex11 = let - Test.label "Create a new clock with an initial time, hour and minutes roll over to exactly midnight" <| Test.expect (create +72 +8640 === "00:00") + Test.label.deprecated "Create a new clock with an initial time, hour and minutes roll over to exactly midnight" <| Test.expect (create +72 +8640 === "00:00") clock.test.ex12 = let - Test.label "Create a new clock with an initial time, negative hour" <| Test.expect (create -1 +15 === "23:15") + Test.label.deprecated "Create a new clock with an initial time, negative hour" <| Test.expect (create -1 +15 === "23:15") clock.test.ex13 = let - Test.label "Create a new clock with an initial time, negative hour rolls over" <| Test.expect (create -25 +0 === "23:00") + Test.label.deprecated "Create a new clock with an initial time, negative hour rolls over" <| Test.expect (create -25 +0 === "23:00") clock.test.ex14 = let - Test.label "Create a new clock with an initial time, negative hour rolls over continuously" <| Test.expect (create -91 +0 === "05:00") + Test.label.deprecated "Create a new clock with an initial time, negative hour rolls over continuously" <| Test.expect (create -91 +0 === "05:00") clock.test.ex15 = let - Test.label "Create a new clock with an initial time, negative minutes" <| Test.expect (create +1 -40 === "00:20") + Test.label.deprecated "Create a new clock with an initial time, negative minutes" <| Test.expect (create +1 -40 === "00:20") clock.test.ex16 = let - Test.label "Create a new clock with an initial time, negative minutes roll over" <| Test.expect (create +1 -160 === "22:20") + Test.label.deprecated "Create a new clock with an initial time, negative minutes roll over" <| Test.expect (create +1 -160 === "22:20") clock.test.ex17 = let - Test.label "Create a new clock with an initial time, negative minutes roll over continuously" <| Test.expect (create +1 -4820 === "16:40") + Test.label.deprecated "Create a new clock with an initial time, negative minutes roll over continuously" <| Test.expect (create +1 -4820 === "16:40") clock.test.ex18 = let - Test.label "Create a new clock with an initial time, negative sixty minutes is previous hour" <| Test.expect (create +2 -60 === "01:00") + Test.label.deprecated "Create a new clock with an initial time, negative sixty minutes is previous hour" <| Test.expect (create +2 -60 === "01:00") clock.test.ex19 = let - Test.label "Create a new clock with an initial time, negative hour and minutes both roll over" <| Test.expect (create -25 -160 === "20:20") + Test.label.deprecated "Create a new clock with an initial time, negative hour and minutes both roll over" <| Test.expect (create -25 -160 === "20:20") clock.test.ex20 = let - Test.label "Create a new clock with an initial time, negative hour and minutes both roll over continuously" <| Test.expect (create -121 -5810 === "22:10") + Test.label.deprecated "Create a new clock with an initial time, negative hour and minutes both roll over continuously" <| Test.expect (create -121 -5810 === "22:10") clock.test.ex21 = let - Test.label "Add minutes, add minutes" <| Test.expect (add +10 +0 +3 === "10:03") + Test.label.deprecated "Add minutes, add minutes" <| Test.expect (add +10 +0 +3 === "10:03") clock.test.ex22 = let - Test.label "Add minutes, add no minutes" <| Test.expect (add +6 +41 +0 === "06:41") + Test.label.deprecated "Add minutes, add no minutes" <| Test.expect (add +6 +41 +0 === "06:41") clock.test.ex23 = let - Test.label "Add minutes, add to next hour" <| Test.expect (add +0 +45 +40 === "01:25") + Test.label.deprecated "Add minutes, add to next hour" <| Test.expect (add +0 +45 +40 === "01:25") clock.test.ex24 = let - Test.label "Add minutes, add more than one hour" <| Test.expect (add +10 +0 +61 === "11:01") + Test.label.deprecated "Add minutes, add more than one hour" <| Test.expect (add +10 +0 +61 === "11:01") clock.test.ex25 = let - Test.label "Add minutes, add more than two hours with carry" <| Test.expect (add +0 +45 +160 === "03:25") + Test.label.deprecated "Add minutes, add more than two hours with carry" <| Test.expect (add +0 +45 +160 === "03:25") clock.test.ex26 = let - Test.label "Add minutes, add across midnight" <| Test.expect (add +23 +59 +2 === "00:01") + Test.label.deprecated "Add minutes, add across midnight" <| Test.expect (add +23 +59 +2 === "00:01") clock.test.ex27 = let - Test.label "Add minutes, add more than one day (1500 min = 25 hrs)" <| Test.expect (add +5 +32 +1500 === "06:32") + Test.label.deprecated "Add minutes, add more than one day (1500 min = 25 hrs)" <| Test.expect (add +5 +32 +1500 === "06:32") clock.test.ex28 = let - Test.label "Add minutes, add more than two days" <| Test.expect (add +1 +1 +3500 === "11:21") + Test.label.deprecated "Add minutes, add more than two days" <| Test.expect (add +1 +1 +3500 === "11:21") clock.test.ex29 = let - Test.label "Subtract minutes, subtract minutes" <| Test.expect (subtract +10 +3 +3 === "10:00") + Test.label.deprecated "Subtract minutes, subtract minutes" <| Test.expect (subtract +10 +3 +3 === "10:00") clock.test.ex30 = let - Test.label "Subtract minutes, subtract to previous hour" <| Test.expect (subtract +10 +3 +30 === "09:33") + Test.label.deprecated "Subtract minutes, subtract to previous hour" <| Test.expect (subtract +10 +3 +30 === "09:33") clock.test.ex31 = let - Test.label "Subtract minutes, subtract more than an hour" <| Test.expect (subtract +10 +3 +70 === "08:53") + Test.label.deprecated "Subtract minutes, subtract more than an hour" <| Test.expect (subtract +10 +3 +70 === "08:53") clock.test.ex32 = let - Test.label "Subtract minutes, subtract across midnight" <| Test.expect (subtract +0 +3 +4 === "23:59") + Test.label.deprecated "Subtract minutes, subtract across midnight" <| Test.expect (subtract +0 +3 +4 === "23:59") clock.test.ex33 = let - Test.label "Subtract minutes, subtract more than two hours" <| Test.expect (subtract +0 +0 +160 === "21:20") + Test.label.deprecated "Subtract minutes, subtract more than two hours" <| Test.expect (subtract +0 +0 +160 === "21:20") clock.test.ex34 = let - Test.label "Subtract minutes, subtract more than two hours with borrow" <| Test.expect (subtract +6 +15 +160 === "03:35") + Test.label.deprecated "Subtract minutes, subtract more than two hours with borrow" <| Test.expect (subtract +6 +15 +160 === "03:35") clock.test.ex35 = let - Test.label "Subtract minutes, subtract more than one day (1500 min = 25 hrs)" <| Test.expect (subtract +5 +32 +1500 === "04:32") + Test.label.deprecated "Subtract minutes, subtract more than one day (1500 min = 25 hrs)" <| Test.expect (subtract +5 +32 +1500 === "04:32") clock.test.ex36 = let - Test.label "Subtract minutes, subtract more than two days" <| Test.expect (subtract +2 +20 +3000 === "00:20") + Test.label.deprecated "Subtract minutes, subtract more than two days" <| Test.expect (subtract +2 +20 +3000 === "00:20") clock.test.ex37 = let - Test.label "Compare two clocks for equality, clocks with same time" <| Test.expect (equal (+15, +37) (+15, +37) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with same time" <| Test.expect (equal (+15, +37) (+15, +37) === true) clock.test.ex38 = let - Test.label "Compare two clocks for equality, clocks a minute apart" <| Test.expect (equal (+15, +36) (+15, +37) === false) + Test.label.deprecated "Compare two clocks for equality, clocks a minute apart" <| Test.expect (equal (+15, +36) (+15, +37) === false) clock.test.ex39 = let - Test.label "Compare two clocks for equality, clocks an hour apart" <| Test.expect (equal (+14, +37) (+15, +37) === false) + Test.label.deprecated "Compare two clocks for equality, clocks an hour apart" <| Test.expect (equal (+14, +37) (+15, +37) === false) clock.test.ex40 = let - Test.label "Compare two clocks for equality, clocks with hour overflow" <| Test.expect (equal (+10, +37) (+34, +37) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with hour overflow" <| Test.expect (equal (+10, +37) (+34, +37) === true) clock.test.ex41 = let - Test.label "Compare two clocks for equality, clocks with hour overflow by several days" <| Test.expect (equal (+3, +11) (+99, +11) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with hour overflow by several days" <| Test.expect (equal (+3, +11) (+99, +11) === true) clock.test.ex42 = let - Test.label "Compare two clocks for equality, clocks with negative hour" <| Test.expect (equal (+22, +40) (-2, +40) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative hour" <| Test.expect (equal (+22, +40) (-2, +40) === true) clock.test.ex43 = let - Test.label "Compare two clocks for equality, clocks with negative hour that wraps" <| Test.expect (equal (+17, +3) (-31, +3) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative hour that wraps" <| Test.expect (equal (+17, +3) (-31, +3) === true) clock.test.ex44 = let - Test.label "Compare two clocks for equality, clocks with negative hour that wraps multiple times" <| Test.expect (equal (+13, +49) (-83, +49) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative hour that wraps multiple times" <| Test.expect (equal (+13, +49) (-83, +49) === true) clock.test.ex45 = let - Test.label "Compare two clocks for equality, clocks with minute overflow" <| Test.expect (equal (+0, +1) (+0, +1441) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with minute overflow" <| Test.expect (equal (+0, +1) (+0, +1441) === true) clock.test.ex46 = let - Test.label "Compare two clocks for equality, clocks with minute overflow by several days" <| Test.expect (equal (+2, +2) (+2, +4322) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with minute overflow by several days" <| Test.expect (equal (+2, +2) (+2, +4322) === true) clock.test.ex47 = let - Test.label "Compare two clocks for equality, clocks with negative minute" <| Test.expect (equal (+2, +40) (+3, -20) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative minute" <| Test.expect (equal (+2, +40) (+3, -20) === true) clock.test.ex48 = let - Test.label "Compare two clocks for equality, clocks with negative minute that wraps" <| Test.expect (equal (+4, +10) (+5, -1490) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative minute that wraps" <| Test.expect (equal (+4, +10) (+5, -1490) === true) clock.test.ex49 = let - Test.label "Compare two clocks for equality, clocks with negative minute that wraps multiple times" <| Test.expect (equal (+6, +15) (+6, -4305) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative minute that wraps multiple times" <| Test.expect (equal (+6, +15) (+6, -4305) === true) clock.test.ex50 = let - Test.label "Compare two clocks for equality, clocks with negative hours and minutes" <| Test.expect (equal (+7, +32) (-12, -268) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative hours and minutes" <| Test.expect (equal (+7, +32) (-12, -268) === true) clock.test.ex51 = let - Test.label "Compare two clocks for equality, clocks with negative hours and minutes that wrap" <| Test.expect (equal (+18, +7) (-54, -11513) === true) + Test.label.deprecated "Compare two clocks for equality, clocks with negative hours and minutes that wrap" <| Test.expect (equal (+18, +7) (-54, -11513) === true) clock.test.ex52 = let - Test.label "Compare two clocks for equality, full clock and zeroed clock" <| Test.expect (equal (+24, +0) (+0, +0) === true) + Test.label.deprecated "Compare two clocks for equality, full clock and zeroed clock" <| Test.expect (equal (+24, +0) (+0, +0) === true) test> clock.tests = runAll [ clock.test.ex1, diff --git a/exercises/practice/collatz-conjecture/.meta/testAnnotation.json b/exercises/practice/collatz-conjecture/.meta/testAnnotation.json index 22af008..f8a945e 100644 --- a/exercises/practice/collatz-conjecture/.meta/testAnnotation.json +++ b/exercises/practice/collatz-conjecture/.meta/testAnnotation.json @@ -1,22 +1,22 @@ [ { - "test_code": "collatzConjecture.test.ex1 = let\n\tTest.label \"zero steps for one\" <| Test.expect (steps 1 === Some 0)", - "name": "collatzConjecture.test.ex1" + "name": "zero steps for one", + "test_code": "let\n Test.label.deprecated \"zero steps for one\" <| Test.expect (steps 1 === Some 0)" }, { - "test_code": "collatzConjecture.test.ex2 = let\n\tTest.label \"divide if even\" <| Test.expect (steps 16 === Some 4)", - "name": "collatzConjecture.test.ex2" + "name": "divide if even", + "test_code": "let\n Test.label.deprecated \"divide if even\" <| Test.expect (steps 16 === Some 4)" }, { - "test_code": "collatzConjecture.test.ex3 = let\n\tTest.label \"even and odd steps\" <| Test.expect (steps 12 === Some 9)", - "name": "collatzConjecture.test.ex3" + "name": "even and odd steps", + "test_code": "let\n Test.label.deprecated \"even and odd steps\" <| Test.expect (steps 12 === Some 9)" }, { - "test_code": "collatzConjecture.test.ex4 = let\n\tTest.label \"large number of even and odd steps\" <| Test.expect (steps 1000000 === Some 152)", - "name": "collatzConjecture.test.ex4" + "name": "large number of even and odd steps", + "test_code": "let\n Test.label.deprecated \"large number of even and odd steps\" <| Test.expect (steps 1000000 === Some 152)" }, { - "test_code": "collatzConjecture.test.ex5 = let\n\tTest.label \"zero is an error\" <| Test.expect (steps 0 === None)", - "name": "collatzConjecture.test.ex5" + "name": "zero is an error", + "test_code": "let\n Test.label.deprecated \"zero is an error\" <| Test.expect (steps 0 === None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/collatz-conjecture/.meta/testLoader.md b/exercises/practice/collatz-conjecture/.meta/testLoader.md index ed7ac63..1b7a721 100644 --- a/exercises/practice/collatz-conjecture/.meta/testLoader.md +++ b/exercises/practice/collatz-conjecture/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./collatz.u -.> add -.> load ./collatz.test.u -.> add -.> move.term collatzConjecture.tests tests +scratch/main> load ./collatz.u +scratch/main> add +scratch/main> load ./collatz.test.u +scratch/main> add +scratch/main> move.term collatzConjecture.tests tests ``` diff --git a/exercises/practice/collatz-conjecture/collatz.test.u b/exercises/practice/collatz-conjecture/collatz.test.u index c4015c5..3e0388a 100644 --- a/exercises/practice/collatz-conjecture/collatz.test.u +++ b/exercises/practice/collatz-conjecture/collatz.test.u @@ -1,17 +1,17 @@ collatzConjecture.test.ex1 = let - Test.label "zero steps for one" <| Test.expect (steps 1 === Some 0) + Test.label.deprecated "zero steps for one" <| Test.expect (steps 1 === Some 0) collatzConjecture.test.ex2 = let - Test.label "divide if even" <| Test.expect (steps 16 === Some 4) + Test.label.deprecated "divide if even" <| Test.expect (steps 16 === Some 4) collatzConjecture.test.ex3 = let - Test.label "even and odd steps" <| Test.expect (steps 12 === Some 9) + Test.label.deprecated "even and odd steps" <| Test.expect (steps 12 === Some 9) collatzConjecture.test.ex4 = let - Test.label "large number of even and odd steps" <| Test.expect (steps 1000000 === Some 152) + Test.label.deprecated "large number of even and odd steps" <| Test.expect (steps 1000000 === Some 152) collatzConjecture.test.ex5 = let - Test.label "zero is an error" <| Test.expect (steps 0 === None) + Test.label.deprecated "zero is an error" <| Test.expect (steps 0 === None) test> collatzConjecture.tests = runAll [ collatzConjecture.test.ex1, diff --git a/exercises/practice/crypto-square/.meta/testAnnotation.json b/exercises/practice/crypto-square/.meta/testAnnotation.json index 62bcd43..0f1bd20 100644 --- a/exercises/practice/crypto-square/.meta/testAnnotation.json +++ b/exercises/practice/crypto-square/.meta/testAnnotation.json @@ -1,30 +1,30 @@ [ { - "test_code": "cryptoSquare.test.ex1 = let\n\tTest.label \"empty plaintext results in an empty ciphertext\" <| Test.expect (ciphertext \"\" === \"\")", - "name": "cryptoSquare.test.ex1" + "name": "empty plaintext results in an empty ciphertext", + "test_code": "let\n Test.label.deprecated \"empty plaintext results in an empty ciphertext\" <| Test.expect (ciphertext \"\" === \"\")" }, { - "test_code": "cryptoSquare.test.ex2 = let\n\tTest.label \"Lowercase\" <| Test.expect (ciphertext \"A\" === \"a\")", - "name": "cryptoSquare.test.ex2" + "name": "Lowercase", + "test_code": "let\n Test.label.deprecated \"Lowercase\" <| Test.expect (ciphertext \"A\" === \"a\")" }, { - "test_code": "cryptoSquare.test.ex3 = let\n\tTest.label \"Remove spaces\" <| Test.expect (ciphertext \" b \" === \"b\")", - "name": "cryptoSquare.test.ex3" + "name": "Remove spaces", + "test_code": "let\n Test.label.deprecated \"Remove spaces\" <| Test.expect (ciphertext \" b \" === \"b\")" }, { - "test_code": "cryptoSquare.test.ex4 = let\n\tTest.label \"Remove punctuation\" <| Test.expect (ciphertext \"@1,%!\" === \"1\")", - "name": "cryptoSquare.test.ex4" + "name": "Remove punctuation", + "test_code": "let\n Test.label.deprecated \"Remove punctuation\" <| Test.expect (ciphertext \"@1,%!\" === \"1\")" }, { - "test_code": "cryptoSquare.test.ex5 = let\n\tTest.label \"9 character plaintext results in 3 chunks of 3 characters\" <| Test.expect (ciphertext \"This is fun!\" === \"tsf hiu isn\")", - "name": "cryptoSquare.test.ex5" + "name": "9 character plaintext results in 3 chunks of 3 characters", + "test_code": "let\n Test.label.deprecated \"9 character plaintext results in 3 chunks of 3 characters\" <| Test.expect (ciphertext \"This is fun!\" === \"tsf hiu isn\")" }, { - "test_code": "cryptoSquare.test.ex6 = let\n\tTest.label \"8 character plaintext results in 3 chunks, the last one with a trailing space\" <| Test.expect (ciphertext \"Chill out.\" === \"clu hlt io \")", - "name": "cryptoSquare.test.ex6" + "name": "8 character plaintext results in 3 chunks, the last one with a trailing space", + "test_code": "let\n Test.label.deprecated \"8 character plaintext results in 3 chunks, the last one with a trailing space\" <| Test.expect (ciphertext \"Chill out.\" === \"clu hlt io \")" }, { - "test_code": "cryptoSquare.test.ex7 = let\n\tTest.label \"54 character plaintext results in 7 chunks, the last two with trailing spaces\" <| Test.expect (ciphertext \"If man was meant to stay on the ground, god would have given us roots.\" === \"imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau \")", - "name": "cryptoSquare.test.ex7" + "name": "54 character plaintext results in 7 chunks, the last two with trailing spaces", + "test_code": "let\n Test.label.deprecated \"54 character plaintext results in 7 chunks, the last two with trailing spaces\" <| Test.expect (ciphertext \"If man was meant to stay on the ground, god would have given us roots.\" === \"imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau \")" } -] +] \ No newline at end of file diff --git a/exercises/practice/crypto-square/.meta/testLoader.md b/exercises/practice/crypto-square/.meta/testLoader.md index 2e673a8..9965565 100644 --- a/exercises/practice/crypto-square/.meta/testLoader.md +++ b/exercises/practice/crypto-square/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./crypto.u -.> add -.> load ./crypto.test.u -.> add -.> move.term cryptoSquare.tests tests +scratch/main> load ./crypto.u +scratch/main> add +scratch/main> load ./crypto.test.u +scratch/main> add +scratch/main> move.term cryptoSquare.tests tests ``` diff --git a/exercises/practice/crypto-square/crypto.test.u b/exercises/practice/crypto-square/crypto.test.u index a3a0724..fd5b3d8 100644 --- a/exercises/practice/crypto-square/crypto.test.u +++ b/exercises/practice/crypto-square/crypto.test.u @@ -1,23 +1,23 @@ cryptoSquare.test.ex1 = let - Test.label "empty plaintext results in an empty ciphertext" <| Test.expect (ciphertext "" === "") + Test.label.deprecated "empty plaintext results in an empty ciphertext" <| Test.expect (ciphertext "" === "") cryptoSquare.test.ex2 = let - Test.label "Lowercase" <| Test.expect (ciphertext "A" === "a") + Test.label.deprecated "Lowercase" <| Test.expect (ciphertext "A" === "a") cryptoSquare.test.ex3 = let - Test.label "Remove spaces" <| Test.expect (ciphertext " b " === "b") + Test.label.deprecated "Remove spaces" <| Test.expect (ciphertext " b " === "b") cryptoSquare.test.ex4 = let - Test.label "Remove punctuation" <| Test.expect (ciphertext "@1,%!" === "1") + Test.label.deprecated "Remove punctuation" <| Test.expect (ciphertext "@1,%!" === "1") cryptoSquare.test.ex5 = let - Test.label "9 character plaintext results in 3 chunks of 3 characters" <| Test.expect (ciphertext "This is fun!" === "tsf hiu isn") + Test.label.deprecated "9 character plaintext results in 3 chunks of 3 characters" <| Test.expect (ciphertext "This is fun!" === "tsf hiu isn") cryptoSquare.test.ex6 = let - Test.label "8 character plaintext results in 3 chunks, the last one with a trailing space" <| Test.expect (ciphertext "Chill out." === "clu hlt io ") + Test.label.deprecated "8 character plaintext results in 3 chunks, the last one with a trailing space" <| Test.expect (ciphertext "Chill out." === "clu hlt io ") cryptoSquare.test.ex7 = let - Test.label "54 character plaintext results in 7 chunks, the last two with trailing spaces" <| Test.expect (ciphertext "If man was meant to stay on the ground, god would have given us roots." === "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ") + Test.label.deprecated "54 character plaintext results in 7 chunks, the last two with trailing spaces" <| Test.expect (ciphertext "If man was meant to stay on the ground, god would have given us roots." === "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau ") test> cryptoSquare.tests = runAll [ cryptoSquare.test.ex1, diff --git a/exercises/practice/darts/.meta/testAnnotation.json b/exercises/practice/darts/.meta/testAnnotation.json index 545dc1c..ef9edf3 100644 --- a/exercises/practice/darts/.meta/testAnnotation.json +++ b/exercises/practice/darts/.meta/testAnnotation.json @@ -1,54 +1,54 @@ [ { - "test_code": "darts.test.ex1 = let\n\tTest.label \"Missed target\" <| Test.expect (score -9.0 9.0 === 0)", - "name": "darts.test.ex1" + "name": "Missed target", + "test_code": "let\n Test.label.deprecated \"Missed target\" <| Test.expect (score -9.0 9.0 === 0)" }, { - "test_code": "darts.test.ex2 = let\n\tTest.label \"On the outer circle\" <| Test.expect (score 0.0 10.0 === 1)", - "name": "darts.test.ex2" + "name": "On the outer circle", + "test_code": "let\n Test.label.deprecated \"On the outer circle\" <| Test.expect (score 0.0 10.0 === 1)" }, { - "test_code": "darts.test.ex3 = let\n\tTest.label \"On the middle circle\" <| Test.expect (score -5.0 0.0 === 5)", - "name": "darts.test.ex3" + "name": "On the middle circle", + "test_code": "let\n Test.label.deprecated \"On the middle circle\" <| Test.expect (score -5.0 0.0 === 5)" }, { - "test_code": "darts.test.ex4 = let\n\tTest.label \"On the inner circle\" <| Test.expect (score 0.0 -1.0 === 10)", - "name": "darts.test.ex4" + "name": "On the inner circle", + "test_code": "let\n Test.label.deprecated \"On the inner circle\" <| Test.expect (score 0.0 -1.0 === 10)" }, { - "test_code": "darts.test.ex5 = let\n\tTest.label \"Exactly on centre\" <| Test.expect (score 0.0 0.0 === 10)", - "name": "darts.test.ex5" + "name": "Exactly on centre", + "test_code": "let\n Test.label.deprecated \"Exactly on centre\" <| Test.expect (score 0.0 0.0 === 10)" }, { - "test_code": "darts.test.ex6 = let\n\tTest.label \"Near the centre\" <| Test.expect (score -0.1 -0.1 === 10)", - "name": "darts.test.ex6" + "name": "Near the centre", + "test_code": "let\n Test.label.deprecated \"Near the centre\" <| Test.expect (score -0.1 -0.1 === 10)" }, { - "test_code": "darts.test.ex7 = let\n\tTest.label \"Just within the inner circle\" <| Test.expect (score 0.7 0.7 === 10)", - "name": "darts.test.ex7" + "name": "Just within the inner circle", + "test_code": "let\n Test.label.deprecated \"Just within the inner circle\" <| Test.expect (score 0.7 0.7 === 10)" }, { - "test_code": "darts.test.ex8 = let\n\tTest.label \"Just outside the inner circle\" <| Test.expect (score 0.8 -0.8 === 5)", - "name": "darts.test.ex8" + "name": "Just outside the inner circle", + "test_code": "let\n Test.label.deprecated \"Just outside the inner circle\" <| Test.expect (score 0.8 -0.8 === 5)" }, { - "test_code": "darts.test.ex9 = let\n\tTest.label \"Just within the middle circle\" <| Test.expect (score -3.5 3.5 === 5)", - "name": "darts.test.ex9" + "name": "Just within the middle circle", + "test_code": "let\n Test.label.deprecated \"Just within the middle circle\" <| Test.expect (score -3.5 3.5 === 5)" }, { - "test_code": "darts.test.ex10 = let\n\tTest.label \"Just outside the middle circle\" <| Test.expect (score -3.6 -3.6 === 1)", - "name": "darts.test.ex10" + "name": "Just outside the middle circle", + "test_code": "let\n Test.label.deprecated \"Just outside the middle circle\" <| Test.expect (score -3.6 -3.6 === 1)" }, { - "test_code": "darts.test.ex11 = let\n\tTest.label \"Just within the outer circle\" <| Test.expect (score -7.0 7.0 === 1)", - "name": "darts.test.ex11" + "name": "Just within the outer circle", + "test_code": "let\n Test.label.deprecated \"Just within the outer circle\" <| Test.expect (score -7.0 7.0 === 1)" }, { - "test_code": "darts.test.ex12 = let\n\tTest.label \"Just outside the outer circle\" <| Test.expect (score 7.1 -7.1 === 0)", - "name": "darts.test.ex12" + "name": "Just outside the outer circle", + "test_code": "let\n Test.label.deprecated \"Just outside the outer circle\" <| Test.expect (score 7.1 -7.1 === 0)" }, { - "test_code": "darts.test.ex13 = let\n\tTest.label \"Asymmetric position between the inner and middle circles\" <| Test.expect (score 0.5 -4.0 === 5)", - "name": "darts.test.ex13" + "name": "Asymmetric position between the inner and middle circles", + "test_code": "let\n Test.label.deprecated \"Asymmetric position between the inner and middle circles\" <| Test.expect (score 0.5 -4.0 === 5)" } ] \ No newline at end of file diff --git a/exercises/practice/darts/.meta/testLoader.md b/exercises/practice/darts/.meta/testLoader.md index edf9a54..133063c 100644 --- a/exercises/practice/darts/.meta/testLoader.md +++ b/exercises/practice/darts/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./darts.u -.> add -.> load ./darts.test.u -.> add -.> move.term darts.tests tests +scratch/main> load ./darts.u +scratch/main> add +scratch/main> load ./darts.test.u +scratch/main> add +scratch/main> move.term darts.tests tests ``` diff --git a/exercises/practice/darts/darts.test.u b/exercises/practice/darts/darts.test.u index e9868de..aa0d0d9 100644 --- a/exercises/practice/darts/darts.test.u +++ b/exercises/practice/darts/darts.test.u @@ -1,41 +1,41 @@ darts.test.ex1 = let - Test.label "Missed target" <| Test.expect (score -9.0 9.0 === 0) + Test.label.deprecated "Missed target" <| Test.expect (score -9.0 9.0 === 0) darts.test.ex2 = let - Test.label "On the outer circle" <| Test.expect (score 0.0 10.0 === 1) + Test.label.deprecated "On the outer circle" <| Test.expect (score 0.0 10.0 === 1) darts.test.ex3 = let - Test.label "On the middle circle" <| Test.expect (score -5.0 0.0 === 5) + Test.label.deprecated "On the middle circle" <| Test.expect (score -5.0 0.0 === 5) darts.test.ex4 = let - Test.label "On the inner circle" <| Test.expect (score 0.0 -1.0 === 10) + Test.label.deprecated "On the inner circle" <| Test.expect (score 0.0 -1.0 === 10) darts.test.ex5 = let - Test.label "Exactly on centre" <| Test.expect (score 0.0 0.0 === 10) + Test.label.deprecated "Exactly on centre" <| Test.expect (score 0.0 0.0 === 10) darts.test.ex6 = let - Test.label "Near the centre" <| Test.expect (score -0.1 -0.1 === 10) + Test.label.deprecated "Near the centre" <| Test.expect (score -0.1 -0.1 === 10) darts.test.ex7 = let - Test.label "Just within the inner circle" <| Test.expect (score 0.7 0.7 === 10) + Test.label.deprecated "Just within the inner circle" <| Test.expect (score 0.7 0.7 === 10) darts.test.ex8 = let - Test.label "Just outside the inner circle" <| Test.expect (score 0.8 -0.8 === 5) + Test.label.deprecated "Just outside the inner circle" <| Test.expect (score 0.8 -0.8 === 5) darts.test.ex9 = let - Test.label "Just within the middle circle" <| Test.expect (score -3.5 3.5 === 5) + Test.label.deprecated "Just within the middle circle" <| Test.expect (score -3.5 3.5 === 5) darts.test.ex10 = let - Test.label "Just outside the middle circle" <| Test.expect (score -3.6 -3.6 === 1) + Test.label.deprecated "Just outside the middle circle" <| Test.expect (score -3.6 -3.6 === 1) darts.test.ex11 = let - Test.label "Just within the outer circle" <| Test.expect (score -7.0 7.0 === 1) + Test.label.deprecated "Just within the outer circle" <| Test.expect (score -7.0 7.0 === 1) darts.test.ex12 = let - Test.label "Just outside the outer circle" <| Test.expect (score 7.1 -7.1 === 0) + Test.label.deprecated "Just outside the outer circle" <| Test.expect (score 7.1 -7.1 === 0) darts.test.ex13 = let - Test.label "Asymmetric position between the inner and middle circles" <| Test.expect (score 0.5 -4.0 === 5) + Test.label.deprecated "Asymmetric position between the inner and middle circles" <| Test.expect (score 0.5 -4.0 === 5) test> darts.tests = runAll [ darts.test.ex1, diff --git a/exercises/practice/diamond/.meta/testAnnotation.json b/exercises/practice/diamond/.meta/testAnnotation.json index 4c61215..50d52d4 100644 --- a/exercises/practice/diamond/.meta/testAnnotation.json +++ b/exercises/practice/diamond/.meta/testAnnotation.json @@ -1,22 +1,22 @@ [ { - "test_code": "diamond.test.ex1 = let\n\tTest.label \"Degenerate case with a single 'A' row\" <| Test.expect (rows \"A\" === [\"A\"])", - "name": "diamond.test.ex1" + "name": "Degenerate case with a single 'A' row", + "test_code": "let\n Test.label.deprecated \"Degenerate case with a single 'A' row\" <| Test.expect (rows ?A === [\"A\"])" }, { - "test_code": "diamond.test.ex2 = let\n\tTest.label \"Degenerate case with no row containing 3 distinct groups of spaces\" <| Test.expect (rows \"B\" === [\" A \",\"B B\",\" A \"])", - "name": "diamond.test.ex2" + "name": "Degenerate case with no row containing 3 distinct groups of spaces", + "test_code": "let\n Test.label.deprecated \"Degenerate case with no row containing 3 distinct groups of spaces\" <| Test.expect (rows ?B === [\" A \",\"B B\",\" A \"])" }, { - "test_code": "diamond.test.ex3 = let\n\tTest.label \"Smallest non-degenerate case with odd diamond side length\" <| Test.expect (rows \"C\" === [\" A \",\" B B \",\"C C\",\" B B \",\" A \"])", - "name": "diamond.test.ex3" + "name": "Smallest non-degenerate case with odd diamond side length", + "test_code": "let\n Test.label.deprecated \"Smallest non-degenerate case with odd diamond side length\" <| Test.expect (rows ?C === [\" A \",\" B B \",\"C C\",\" B B \",\" A \"])" }, { - "test_code": "diamond.test.ex4 = let\n\tTest.label \"Smallest non-degenerate case with even diamond side length\" <| Test.expect (rows \"D\" === [\" A \",\" B B \",\" C C \",\"D D\",\" C C \",\" B B \",\" A \"])", - "name": "diamond.test.ex4" + "name": "Smallest non-degenerate case with even diamond side length", + "test_code": "let\n Test.label.deprecated \"Smallest non-degenerate case with even diamond side length\" <| Test.expect (rows ?D === [\" A \",\" B B \",\" C C \",\"D D\",\" C C \",\" B B \",\" A \"])" }, { - "test_code": "diamond.test.ex5 = let\n\tTest.label \"Largest possible diamond\" <| Test.expect (rows \"Z\" === [\" A \",\" B B \",\" C C \",\" D D \",\" E E \",\" F F \",\" G G \",\" H H \",\" I I \",\" J J \",\" K K \",\" L L \",\" M M \",\" N N \",\" O O \",\" P P \",\" Q Q \",\" R R \",\" S S \",\" T T \",\" U U \",\" V V \",\" W W \",\" X X \",\" Y Y \",\"Z Z\",\" Y Y \",\" X X \",\" W W \",\" V V \",\" U U \",\" T T \",\" S S \",\" R R \",\" Q Q \",\" P P \",\" O O \",\" N N \",\" M M \",\" L L \",\" K K \",\" J J \",\" I I \",\" H H \",\" G G \",\" F F \",\" E E \",\" D D \",\" C C \",\" B B \",\" A \"])", - "name": "diamond.test.ex5" + "name": "Largest possible diamond", + "test_code": "let\n Test.label.deprecated \"Largest possible diamond\" <| Test.expect (rows ?Z === [\" A \",\" B B \",\" C C \",\" D D \",\" E E \",\" F F \",\" G G \",\" H H \",\" I I \",\" J J \",\" K K \",\" L L \",\" M M \",\" N N \",\" O O \",\" P P \",\" Q Q \",\" R R \",\" S S \",\" T T \",\" U U \",\" V V \",\" W W \",\" X X \",\" Y Y \",\"Z Z\",\" Y Y \",\" X X \",\" W W \",\" V V \",\" U U \",\" T T \",\" S S \",\" R R \",\" Q Q \",\" P P \",\" O O \",\" N N \",\" M M \",\" L L \",\" K K \",\" J J \",\" I I \",\" H H \",\" G G \",\" F F \",\" E E \",\" D D \",\" C C \",\" B B \",\" A \"])" } -] +] \ No newline at end of file diff --git a/exercises/practice/diamond/.meta/testLoader.md b/exercises/practice/diamond/.meta/testLoader.md index bd059cb..9b09c1e 100644 --- a/exercises/practice/diamond/.meta/testLoader.md +++ b/exercises/practice/diamond/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./diamond.u -.> add -.> load ./diamond.test.u -.> add -.> move.term diamond.tests tests +scratch/main> load ./diamond.u +scratch/main> add +scratch/main> load ./diamond.test.u +scratch/main> add +scratch/main> move.term diamond.tests tests ``` diff --git a/exercises/practice/diamond/diamond.test.u b/exercises/practice/diamond/diamond.test.u index db1500f..74fb487 100644 --- a/exercises/practice/diamond/diamond.test.u +++ b/exercises/practice/diamond/diamond.test.u @@ -1,17 +1,17 @@ diamond.test.ex1 = let - Test.label "Degenerate case with a single 'A' row" <| Test.expect (rows ?A === ["A"]) + Test.label.deprecated "Degenerate case with a single 'A' row" <| Test.expect (rows ?A === ["A"]) diamond.test.ex2 = let - Test.label "Degenerate case with no row containing 3 distinct groups of spaces" <| Test.expect (rows ?B === [" A ","B B"," A "]) + Test.label.deprecated "Degenerate case with no row containing 3 distinct groups of spaces" <| Test.expect (rows ?B === [" A ","B B"," A "]) diamond.test.ex3 = let - Test.label "Smallest non-degenerate case with odd diamond side length" <| Test.expect (rows ?C === [" A "," B B ","C C"," B B "," A "]) + Test.label.deprecated "Smallest non-degenerate case with odd diamond side length" <| Test.expect (rows ?C === [" A "," B B ","C C"," B B "," A "]) diamond.test.ex4 = let - Test.label "Smallest non-degenerate case with even diamond side length" <| Test.expect (rows ?D === [" A "," B B "," C C ","D D"," C C "," B B "," A "]) + Test.label.deprecated "Smallest non-degenerate case with even diamond side length" <| Test.expect (rows ?D === [" A "," B B "," C C ","D D"," C C "," B B "," A "]) diamond.test.ex5 = let - Test.label "Largest possible diamond" <| Test.expect (rows ?Z === [" A "," B B "," C C "," D D "," E E "," F F "," G G "," H H "," I I "," J J "," K K "," L L "," M M "," N N "," O O "," P P "," Q Q "," R R "," S S "," T T "," U U "," V V "," W W "," X X "," Y Y ","Z Z"," Y Y "," X X "," W W "," V V "," U U "," T T "," S S "," R R "," Q Q "," P P "," O O "," N N "," M M "," L L "," K K "," J J "," I I "," H H "," G G "," F F "," E E "," D D "," C C "," B B "," A "]) + Test.label.deprecated "Largest possible diamond" <| Test.expect (rows ?Z === [" A "," B B "," C C "," D D "," E E "," F F "," G G "," H H "," I I "," J J "," K K "," L L "," M M "," N N "," O O "," P P "," Q Q "," R R "," S S "," T T "," U U "," V V "," W W "," X X "," Y Y ","Z Z"," Y Y "," X X "," W W "," V V "," U U "," T T "," S S "," R R "," Q Q "," P P "," O O "," N N "," M M "," L L "," K K "," J J "," I I "," H H "," G G "," F F "," E E "," D D "," C C "," B B "," A "]) test> diamond.tests = runAll [ diamond.test.ex1, diff --git a/exercises/practice/difference-of-squares/.meta/testAnnotation.json b/exercises/practice/difference-of-squares/.meta/testAnnotation.json index e0ede1b..57d13b4 100644 --- a/exercises/practice/difference-of-squares/.meta/testAnnotation.json +++ b/exercises/practice/difference-of-squares/.meta/testAnnotation.json @@ -1,38 +1,38 @@ [ { - "test_code": "differenceOfSquares.test.ex1 = let\n Test.label \"Square of sum 1\" <| Test.expect (squareOfSum 1 === 1)", - "name": "differenceOfSquares.test.ex1" + "name": "Square of sum 1", + "test_code": "let\n Test.label.deprecated \"Square of sum 1\" <| Test.expect (squareOfSum 1 === 1)" }, { - "test_code": "differenceOfSquares.test.ex2 = let\n Test.label \"Square of sum 5\" <| Test.expect (squareOfSum 5 === 225)", - "name": "differenceOfSquares.test.ex2" + "name": "Square of sum 5", + "test_code": "let\n Test.label.deprecated \"Square of sum 5\" <| Test.expect (squareOfSum 5 === 225)" }, { - "test_code": "differenceOfSquares.test.ex3 = let\n Test.label \"Square of sum 100\" <| Test.expect (squareOfSum 100 === 25502500)", - "name": "differenceOfSquares.test.ex3" + "name": "Square of sum 100", + "test_code": "let\n Test.label.deprecated \"Square of sum 100\" <| Test.expect (squareOfSum 100 === 25502500)" }, { - "test_code": "differenceOfSquares.test.ex4 = let\n Test.label \"Sum of squares 1\" <| Test.expect (sumOfSquares 1 === 1)", - "name": "differenceOfSquares.test.ex4" + "name": "Sum of squares 1", + "test_code": "let\n Test.label.deprecated \"Sum of squares 1\" <| Test.expect (sumOfSquares 1 === 1)" }, { - "test_code": "differenceOfSquares.test.ex5 = let\n Test.label \"Sum of squares 5\" <| Test.expect (sumOfSquares 5 === 55)", - "name": "differenceOfSquares.test.ex5" + "name": "Sum of squares 5", + "test_code": "let\n Test.label.deprecated \"Sum of squares 5\" <| Test.expect (sumOfSquares 5 === 55)" }, { - "test_code": "differenceOfSquares.test.ex6 = let\n Test.label \"Sum of squares 100\" <| Test.expect (sumOfSquares 100 === 338350)", - "name": "differenceOfSquares.test.ex6" + "name": "Sum of squares 100", + "test_code": "let\n Test.label.deprecated \"Sum of squares 100\" <| Test.expect (sumOfSquares 100 === 338350)" }, { - "test_code": "differenceOfSquares.test.ex7 = let\n Test.label \"Difference of squares 1\" <| Test.expect (difference 1 === 0)", - "name": "differenceOfSquares.test.ex7" + "name": "Difference of squares 1", + "test_code": "let\n Test.label.deprecated \"Difference of squares 1\" <| Test.expect (difference 1 === 0)" }, { - "test_code": "differenceOfSquares.test.ex8 = let\n Test.label \"Difference of squares 5\" <| Test.expect (difference 5 === 170)", - "name": "differenceOfSquares.test.ex8" + "name": "Difference of squares 5", + "test_code": "let\n Test.label.deprecated \"Difference of squares 5\" <| Test.expect (difference 5 === 170)" }, { - "test_code": "differenceOfSquares.test.ex9 = let\n Test.label \"Difference of squares 100\" <| Test.expect (difference 100 === 25164150)", - "name": "differenceOfSquares.test.ex9" + "name": "Difference of squares 100", + "test_code": "let\n Test.label.deprecated \"Difference of squares 100\" <| Test.expect (difference 100 === 25164150)" } -] +] \ No newline at end of file diff --git a/exercises/practice/difference-of-squares/.meta/testLoader.md b/exercises/practice/difference-of-squares/.meta/testLoader.md index 8ad8a75..e9baac5 100644 --- a/exercises/practice/difference-of-squares/.meta/testLoader.md +++ b/exercises/practice/difference-of-squares/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for difference-of-squares exercise ```ucm -.> load ./differenceOfSquares.u -.> add -.> load ./differenceOfSquares.test.u -.> add -.> move.term differenceOfSquares.tests tests +scratch/main> load ./differenceOfSquares.u +scratch/main> add +scratch/main> load ./differenceOfSquares.test.u +scratch/main> add +scratch/main> move.term differenceOfSquares.tests tests ``` diff --git a/exercises/practice/difference-of-squares/differenceOfSquares.test.u b/exercises/practice/difference-of-squares/differenceOfSquares.test.u index 4e35327..92ec970 100644 --- a/exercises/practice/difference-of-squares/differenceOfSquares.test.u +++ b/exercises/practice/difference-of-squares/differenceOfSquares.test.u @@ -1,29 +1,29 @@ differenceOfSquares.test.ex1 = let - Test.label "Square of sum 1" <| Test.expect (squareOfSum 1 === 1) + Test.label.deprecated "Square of sum 1" <| Test.expect (squareOfSum 1 === 1) differenceOfSquares.test.ex2 = let - Test.label "Square of sum 5" <| Test.expect (squareOfSum 5 === 225) + Test.label.deprecated "Square of sum 5" <| Test.expect (squareOfSum 5 === 225) differenceOfSquares.test.ex3 = let - Test.label "Square of sum 100" <| Test.expect (squareOfSum 100 === 25502500) + Test.label.deprecated "Square of sum 100" <| Test.expect (squareOfSum 100 === 25502500) differenceOfSquares.test.ex4 = let - Test.label "Sum of squares 1" <| Test.expect (sumOfSquares 1 === 1) + Test.label.deprecated "Sum of squares 1" <| Test.expect (sumOfSquares 1 === 1) differenceOfSquares.test.ex5 = let - Test.label "Sum of squares 5" <| Test.expect (sumOfSquares 5 === 55) + Test.label.deprecated "Sum of squares 5" <| Test.expect (sumOfSquares 5 === 55) differenceOfSquares.test.ex6 = let - Test.label "Sum of squares 100" <| Test.expect (sumOfSquares 100 === 338350) + Test.label.deprecated "Sum of squares 100" <| Test.expect (sumOfSquares 100 === 338350) differenceOfSquares.test.ex7 = let - Test.label "Difference of squares 1" <| Test.expect (difference 1 === 0) + Test.label.deprecated "Difference of squares 1" <| Test.expect (difference 1 === 0) differenceOfSquares.test.ex8 = let - Test.label "Difference of squares 5" <| Test.expect (difference 5 === 170) + Test.label.deprecated "Difference of squares 5" <| Test.expect (difference 5 === 170) differenceOfSquares.test.ex9 = let - Test.label "Difference of squares 100" <| Test.expect (difference 100 === 25164150) + Test.label.deprecated "Difference of squares 100" <| Test.expect (difference 100 === 25164150) test> differenceOfSquares.tests = runAll [ differenceOfSquares.test.ex1, diff --git a/exercises/practice/dnd-character/.meta/testAnnotation.json b/exercises/practice/dnd-character/.meta/testAnnotation.json index f38c1dc..ad9d5a5 100644 --- a/exercises/practice/dnd-character/.meta/testAnnotation.json +++ b/exercises/practice/dnd-character/.meta/testAnnotation.json @@ -1,74 +1,74 @@ [ { - "test_code": "input = 18\n expected = 4\n label \"computes the modifier for 18 to be 4\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex1" + "name": "computes the modifier for 18 to be 4", + "test_code": "input = 18\n expected = +4\n Test.label.deprecated \"computes the modifier for 18 to be 4\" <| expect (expected == modifier input)" }, { - "test_code": "input = 17\n expected = 3\n label \"computes the modifier for 17 to be 3\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex2" + "name": "computes the modifier for 17 to be 3", + "test_code": "input = 17\n expected = +3\n Test.label.deprecated \"computes the modifier for 17 to be 3\" <| expect (expected == modifier input)" }, { - "test_code": "input = 16\n expected = 3\n label \"computes the modifier for 16 to be 3\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex3" + "name": "computes the modifier for 16 to be 3", + "test_code": "input = 16\n expected = +3\n Test.label.deprecated \"computes the modifier for 16 to be 3\" <| expect (expected == modifier input)" }, { - "test_code": "input = 15\n expected = 2\n label \"computes the modifier for 15 to be 2\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex4" + "name": "computes the modifier for 15 to be 2", + "test_code": "input = 15\n expected = +2\n Test.label.deprecated \"computes the modifier for 15 to be 2\" <| expect (expected == modifier input)" }, { - "test_code": "input = 14\n expected = 2\n label \"computes the modifier for 14 to be 2\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex5" + "name": "computes the modifier for 14 to be 2", + "test_code": "input = 14\n expected = +2\n Test.label.deprecated \"computes the modifier for 14 to be 2\" <| expect (expected == modifier input)" }, { - "test_code": "input = 13\n expected = 1\n label \"computes the modifier for 13 to be 1\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex6" + "name": "computes the modifier for 13 to be 1", + "test_code": "input = 13\n expected = +1\n Test.label.deprecated \"computes the modifier for 13 to be 1\" <| expect (expected == modifier input)" }, { - "test_code": "input = 12\n expected = 1\n label \"computes the modifier for 12 to be 1\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex7" + "name": "computes the modifier for 12 to be 1", + "test_code": "input = 12\n expected = +1\n Test.label.deprecated \"computes the modifier for 12 to be 1\" <| expect (expected == modifier input)" }, { - "test_code": "input = 11\n expected = 0\n label \"computes the modifier for 11 to be 0\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex8" + "name": "computes the modifier for 11 to be 0", + "test_code": "input = 11\n expected = +0\n Test.label.deprecated \"computes the modifier for 11 to be 0\" <| expect (expected == modifier input)" }, { - "test_code": "input = 10\n expected = 0\n label \"computes the modifier for 10 to be 0\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex9" + "name": "computes the modifier for 10 to be 0", + "test_code": "input = 10\n expected = +0\n Test.label.deprecated \"computes the modifier for 10 to be 0\" <| expect (expected == modifier input)" }, { - "test_code": "input = 9\n expected = -1\n label \"computes the modifier for 9 to be -1\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex10" + "name": "computes the modifier for 9 to be -1", + "test_code": "input = 9\n expected = -1\n Test.label.deprecated \"computes the modifier for 9 to be -1\" <| expect (expected == modifier input)" }, { - "test_code": "input = 8\n expected = -1\n label \"computes the modifier for 8 to be -1\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex11" + "name": "computes the modifier for 8 to be -1", + "test_code": "input = 8\n expected = -1\n Test.label.deprecated \"computes the modifier for 8 to be -1\" <| expect (expected == modifier input)" }, { - "test_code": "input = 7\n expected = -2\n label \"computes the modifier for 7 to be -2\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex12" + "name": "computes the modifier for 7 to be -2", + "test_code": "input = 7\n expected = -2\n Test.label.deprecated \"computes the modifier for 7 to be -2\" <| expect (expected == modifier input)" }, { - "test_code": "input = 6\n expected = -2\n label \"computes the modifier for 6 to be -2\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex13" + "name": "computes the modifier for 6 to be -2", + "test_code": "input = 6\n expected = -2\n Test.label.deprecated \"computes the modifier for 6 to be -2\" <| expect (expected == modifier input)" }, { - "test_code": "input = 5\n expected = -3\n label \"computes the modifier for 5 to be -3\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex14" + "name": "computes the modifier for 5 to be -3", + "test_code": "input = 5\n expected = -3\n Test.label.deprecated \"computes the modifier for 5 to be -3\" <| expect (expected == modifier input)" }, { - "test_code": "input = 4\n expected = -3\n label \"computes the modifier for 4 to be -3\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex15" + "name": "computes the modifier for 4 to be -3", + "test_code": "input = 4\n expected = -3\n Test.label.deprecated \"computes the modifier for 4 to be -3\" <| expect (expected == modifier input)" }, { - "test_code": "input = 3\n expected = -4\n label \"computes the modifier for 3 to be -4\" <| expect (expected == modifier input)", - "name": "dndCharacter.test.testModifier.ex16" + "name": "computes the modifier for 3 to be -4", + "test_code": "input = 3\n expected = -4\n Test.label.deprecated \"computes the modifier for 3 to be -4\" <| expect (expected == modifier input)" }, { - "test_code": "do\n seed = !nat\n calculatedAbility = Random.lcg seed ability_\n label \"generates value within range\" <| expect (Nat.inRange 3 19 calculatedAbility)\n", - "name": "dndCharacter.test.testAbility" + "name": "generates value within range", + "test_code": "do\n use test.deprecated.gen nat\n seed = !nat\n calculatedAbility = Random.lcg seed ability_\n Test.label.deprecated \"generates value within range\" <| expect (Nat.inRange 3 19 calculatedAbility)" }, { - "test_code": "do\n seed = !nat\n (Character strength dexterity constitution intelligence wisdom charisma hitpoints) = Random.lcg seed character\n expectedHitpoints = Int.abs (+10 Int.+ modifier constitution)\n expect ((Nat.inRange 3 19 strength) && (Nat.inRange 3 19 dexterity) && (Nat.inRange 3 19 constitution) && (Nat.inRange 3 19 intelligence) && (Nat.inRange 3 19 wisdom) && (Nat.inRange 3 19 charisma) && (hitpoints == expectedHitpoints)\n ) |> label \"generates valid character\"", - "name": "dndCharacter.test.testCharacter" + "name": "generates valid character", + "test_code": "do\n use test.deprecated.gen nat\n seed = !nat\n (Character strength dexterity constitution intelligence wisdom charisma hitpoints) = Random.lcg seed character\n expectedHitpoints = Int.abs (+10 Int.+ modifier constitution)\n expect ((Nat.inRange 3 19 strength) && (Nat.inRange 3 19 dexterity) && (Nat.inRange 3 19 constitution) && (Nat.inRange 3 19 intelligence) && (Nat.inRange 3 19 wisdom) && (Nat.inRange 3 19 charisma) && (hitpoints == expectedHitpoints)\n ) |> Test.label.deprecated \"generates valid character\"" } -] +] \ No newline at end of file diff --git a/exercises/practice/dnd-character/.meta/testLoader.md b/exercises/practice/dnd-character/.meta/testLoader.md index d971c17..2919a66 100644 --- a/exercises/practice/dnd-character/.meta/testLoader.md +++ b/exercises/practice/dnd-character/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./dndCharacter.u -.> add -.> load ./dndCharacter.test.u -.> add -.> move.term dndCharacter.tests tests +scratch/main> load ./dndCharacter.u +scratch/main> add +scratch/main> load ./dndCharacter.test.u +scratch/main> add +scratch/main> move.term dndCharacter.tests tests ``` diff --git a/exercises/practice/dnd-character/dndCharacter.test.u b/exercises/practice/dnd-character/dndCharacter.test.u index f895201..4b45992 100644 --- a/exercises/practice/dnd-character/dndCharacter.test.u +++ b/exercises/practice/dnd-character/dndCharacter.test.u @@ -3,95 +3,97 @@ use base.test.gen dndCharacter.test.testModifier.ex1 = input = 18 expected = +4 - label "computes the modifier for 18 to be 4" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 18 to be 4" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex2 = input = 17 expected = +3 - label "computes the modifier for 17 to be 3" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 17 to be 3" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex3 = input = 16 expected = +3 - label "computes the modifier for 16 to be 3" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 16 to be 3" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex4 = input = 15 expected = +2 - label "computes the modifier for 15 to be 2" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 15 to be 2" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex5 = input = 14 expected = +2 - label "computes the modifier for 14 to be 2" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 14 to be 2" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex6 = input = 13 expected = +1 - label "computes the modifier for 13 to be 1" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 13 to be 1" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex7 = input = 12 expected = +1 - label "computes the modifier for 12 to be 1" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 12 to be 1" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex8 = input = 11 expected = +0 - label "computes the modifier for 11 to be 0" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 11 to be 0" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex9 = input = 10 expected = +0 - label "computes the modifier for 10 to be 0" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 10 to be 0" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex10 = input = 9 expected = -1 - label "computes the modifier for 9 to be -1" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 9 to be -1" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex11 = input = 8 expected = -1 - label "computes the modifier for 8 to be -1" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 8 to be -1" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex12 = input = 7 expected = -2 - label "computes the modifier for 7 to be -2" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 7 to be -2" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex13 = input = 6 expected = -2 - label "computes the modifier for 6 to be -2" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 6 to be -2" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex14 = input = 5 expected = -3 - label "computes the modifier for 5 to be -3" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 5 to be -3" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex15 = input = 4 expected = -3 - label "computes the modifier for 4 to be -3" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 4 to be -3" <| expect (expected == modifier input) dndCharacter.test.testModifier.ex16 = input = 3 expected = -4 - label "computes the modifier for 3 to be -4" <| expect (expected == modifier input) + Test.label.deprecated "computes the modifier for 3 to be -4" <| expect (expected == modifier input) dndCharacter.test.testAbility = do + use test.deprecated.gen nat seed = !nat calculatedAbility = Random.lcg seed ability_ - label "generates value within range" <| expect (Nat.inRange 3 19 calculatedAbility) + Test.label.deprecated "generates value within range" <| expect (Nat.inRange 3 19 calculatedAbility) dndCharacter.test.testCharacter = do + use test.deprecated.gen nat seed = !nat (Character strength dexterity constitution intelligence wisdom charisma hitpoints) = Random.lcg seed character expectedHitpoints = Int.abs (+10 Int.+ modifier constitution) expect ((Nat.inRange 3 19 strength) && (Nat.inRange 3 19 dexterity) && (Nat.inRange 3 19 constitution) && (Nat.inRange 3 19 intelligence) && (Nat.inRange 3 19 wisdom) && (Nat.inRange 3 19 charisma) && (hitpoints == expectedHitpoints) - ) |> label "generates valid character" + ) |> Test.label.deprecated "generates valid character" test> dndCharacter.tests = [ runs 10 dndCharacter.test.testAbility diff --git a/exercises/practice/etl/.meta/testAnnotation.json b/exercises/practice/etl/.meta/testAnnotation.json index c1c5938..a043a98 100644 --- a/exercises/practice/etl/.meta/testAnnotation.json +++ b/exercises/practice/etl/.meta/testAnnotation.json @@ -1,18 +1,18 @@ [ { - "test_code": "etl.test.ex1 = let\t\n\tlettersByScore = [(1, [?A])] |> Map.fromList\n\texpected = [(?a, 1)] |> Map.fromList\n\tTest.label \"Single letter\" <| Test.expect (transform lettersByScore === expected)", - "name": "etl.test.ex1\n\tlettersByScore\n\texpected" + "name": "Single letter", + "test_code": "let \n lettersByScore = [(1, [?A])] |> Map.fromList\n expected = [(?a, 1)] |> Map.fromList\n Test.label.deprecated \"Single letter\" <| Test.expect (transform lettersByScore === expected)" }, { - "test_code": "etl.test.ex2 = let\n\tlettersByScore = [(1, [?A, ?E, ?I, ?O, ?U])] |> Map.fromList\n\texpected = \n\t\t[ (?a, 1),\n\t\t\t(?e, 1),\n\t\t\t(?i, 1),\n\t\t\t(?o, 1),\n\t\t\t(?u, 1) ] |> Map.fromList\n\tTest.label \"Single score with multiple letters\" <| Test.expect (transform lettersByScore === expected)", - "name": "etl.test.ex2\n\tlettersByScore\n\texpected\n\t\t[\n\t\t\t(?e,\n\t\t\t(?i,\n\t\t\t(?o,\n\t\t\t(?u," + "name": "Single score with multiple letters", + "test_code": "let\n lettersByScore = [(1, [?A, ?E, ?I, ?O, ?U])] |> Map.fromList\n expected = \n [ (?a, 1),\n (?e, 1),\n (?i, 1),\n (?o, 1),\n (?u, 1) ] |> Map.fromList\n Test.label.deprecated \"Single score with multiple letters\" <| Test.expect (transform lettersByScore === expected)" }, { - "test_code": "etl.test.ex3 = let\t\n\tlettersByScore = \n\t\t[ (1, [?A, ?E]),\n\t\t\t(2, [?D, ?G]) ] |> Map.fromList\n\texpected = \n\t\t[ (?a, 1),\n\t\t\t(?d, 2),\n\t\t\t(?e, 1),\n\t\t\t(?g, 2) ] |> Map.fromList\n\tTest.label \"Multiple scores with multiple letters\" <| Test.expect (transform lettersByScore === expected)", - "name": "etl.test.ex3\n\tlettersByScore\n\t\t[\n\t\t\t(2,\n\texpected\n\t\t[\n\t\t\t(?d,\n\t\t\t(?e,\n\t\t\t(?g," + "name": "Multiple scores with multiple letters", + "test_code": "let \n lettersByScore = \n [ (1, [?A, ?E]),\n (2, [?D, ?G]) ] |> Map.fromList\n expected = \n [ (?a, 1),\n (?d, 2),\n (?e, 1),\n (?g, 2) ] |> Map.fromList\n Test.label.deprecated \"Multiple scores with multiple letters\" <| Test.expect (transform lettersByScore === expected)" }, { - "test_code": "etl.test.ex4 = let\n\tlettersByScore = \n\t\t[ (1, [?A, ?E, ?I, ?O, ?U, ?L, ?N, ?R, ?S, ?T]),\n\t\t\t(2, [?D, ?G]),\n\t\t\t(3, [?B, ?C, ?M, ?P]),\n\t\t\t(4, [?F, ?H, ?V, ?W, ?Y]),\n\t\t\t(5, [?K]),\n\t\t\t(8, [?J, ?X]),\n\t\t\t(10, [?Q, ?Z]) ] |> Map.fromList\n\texpected = \n\t\t[ (?a, 1),\n\t\t\t(?b, 3),\n\t\t\t(?c, 3),\n\t\t\t(?d, 2),\n\t\t\t(?e, 1),\n\t\t\t(?f, 4),\n\t\t\t(?g, 2),\n\t\t\t(?h, 4),\n\t\t\t(?i, 1),\n\t\t\t(?j, 8),\n\t\t\t(?k, 5),\n\t\t\t(?l, 1),\n\t\t\t(?m, 3),\n\t\t\t(?n, 1),\n\t\t\t(?o, 1),\n\t\t\t(?p, 3),\n\t\t\t(?q, 10),\n\t\t\t(?r, 1),\n\t\t\t(?s, 1),\n\t\t\t(?t, 1),\n\t\t\t(?u, 1),\n\t\t\t(?v, 4),\n\t\t\t(?w, 4),\n\t\t\t(?x, 8),\n\t\t\t(?y, 4),\n\t\t\t(?z, 10) ] |> Map.fromList\n\tTest.label \"Multiple scores with differing numbers of letters\" <| Test.expect (transform lettersByScore == expected)", - "name": "etl.test.ex4\n\tlettersByScore\n\t\t[\n\t\t\t(2,\n\t\t\t(3,\n\t\t\t(4,\n\t\t\t(5,\n\t\t\t(8,\n\t\t\t(10,\n\texpected\n\t\t[\n\t\t\t(?b,\n\t\t\t(?c,\n\t\t\t(?d,\n\t\t\t(?e,\n\t\t\t(?f,\n\t\t\t(?g,\n\t\t\t(?h,\n\t\t\t(?i,\n\t\t\t(?j,\n\t\t\t(?k,\n\t\t\t(?l,\n\t\t\t(?m,\n\t\t\t(?n,\n\t\t\t(?o,\n\t\t\t(?p,\n\t\t\t(?q,\n\t\t\t(?r,\n\t\t\t(?s,\n\t\t\t(?t,\n\t\t\t(?u,\n\t\t\t(?v,\n\t\t\t(?w,\n\t\t\t(?x,\n\t\t\t(?y,\n\t\t\t(?z," + "name": "Multiple scores with differing numbers of letters", + "test_code": "let\n lettersByScore = \n [ (1, [?A, ?E, ?I, ?O, ?U, ?L, ?N, ?R, ?S, ?T]),\n (2, [?D, ?G]),\n (3, [?B, ?C, ?M, ?P]),\n (4, [?F, ?H, ?V, ?W, ?Y]),\n (5, [?K]),\n (8, [?J, ?X]),\n (10, [?Q, ?Z]) ] |> Map.fromList\n expected = \n [ (?a, 1),\n (?b, 3),\n (?c, 3),\n (?d, 2),\n (?e, 1),\n (?f, 4),\n (?g, 2),\n (?h, 4),\n (?i, 1),\n (?j, 8),\n (?k, 5),\n (?l, 1),\n (?m, 3),\n (?n, 1),\n (?o, 1),\n (?p, 3),\n (?q, 10),\n (?r, 1),\n (?s, 1),\n (?t, 1),\n (?u, 1),\n (?v, 4),\n (?w, 4),\n (?x, 8),\n (?y, 4),\n (?z, 10) ] |> Map.fromList\n Test.label.deprecated \"Multiple scores with differing numbers of letters\" <| Test.expect (transform lettersByScore == expected)" } -] +] \ No newline at end of file diff --git a/exercises/practice/etl/.meta/testLoader.md b/exercises/practice/etl/.meta/testLoader.md index f3c3e49..7cb3467 100644 --- a/exercises/practice/etl/.meta/testLoader.md +++ b/exercises/practice/etl/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./etl.u -.> add -.> load ./etl.test.u -.> add -.> move.term etl.tests tests +scratch/main> load ./etl.u +scratch/main> add +scratch/main> load ./etl.test.u +scratch/main> add +scratch/main> move.term etl.tests tests ``` diff --git a/exercises/practice/etl/etl.test.u b/exercises/practice/etl/etl.test.u index e7ade69..df22153 100644 --- a/exercises/practice/etl/etl.test.u +++ b/exercises/practice/etl/etl.test.u @@ -1,7 +1,7 @@ etl.test.ex1 = let lettersByScore = [(1, [?A])] |> Map.fromList expected = [(?a, 1)] |> Map.fromList - Test.label "Single letter" <| Test.expect (transform lettersByScore === expected) + Test.label.deprecated "Single letter" <| Test.expect (transform lettersByScore === expected) etl.test.ex2 = let lettersByScore = [(1, [?A, ?E, ?I, ?O, ?U])] |> Map.fromList @@ -11,7 +11,7 @@ etl.test.ex2 = let (?i, 1), (?o, 1), (?u, 1) ] |> Map.fromList - Test.label "Single score with multiple letters" <| Test.expect (transform lettersByScore === expected) + Test.label.deprecated "Single score with multiple letters" <| Test.expect (transform lettersByScore === expected) etl.test.ex3 = let lettersByScore = @@ -22,7 +22,7 @@ etl.test.ex3 = let (?d, 2), (?e, 1), (?g, 2) ] |> Map.fromList - Test.label "Multiple scores with multiple letters" <| Test.expect (transform lettersByScore === expected) + Test.label.deprecated "Multiple scores with multiple letters" <| Test.expect (transform lettersByScore === expected) etl.test.ex4 = let lettersByScore = @@ -60,7 +60,7 @@ etl.test.ex4 = let (?x, 8), (?y, 4), (?z, 10) ] |> Map.fromList - Test.label "Multiple scores with differing numbers of letters" <| Test.expect (transform lettersByScore == expected) + Test.label.deprecated "Multiple scores with differing numbers of letters" <| Test.expect (transform lettersByScore == expected) test> etl.tests = runAll [ etl.test.ex1, diff --git a/exercises/practice/hello-world/.meta/testAnnotation.json b/exercises/practice/hello-world/.meta/testAnnotation.json index d951226..f65b7a1 100644 --- a/exercises/practice/hello-world/.meta/testAnnotation.json +++ b/exercises/practice/hello-world/.meta/testAnnotation.json @@ -1,6 +1,6 @@ [ { - "name":"helloWorld.test", - "test_code":"hello.test =\r\n expected = \"Hello, World!\"\r\n Test.expect (hello === expected)" + "name": "hello.test", + "test_code": "expected = \"Hello, World!\"\n Test.expect (hello === expected)\ntest> hello.tests = runAll [hello.test]" } -] +] \ No newline at end of file diff --git a/exercises/practice/hello-world/.meta/testLoader.md b/exercises/practice/hello-world/.meta/testLoader.md index 019faa2..5f1f7ab 100644 --- a/exercises/practice/hello-world/.meta/testLoader.md +++ b/exercises/practice/hello-world/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for hello exercise ```ucm -.> load ./hello.u -.> add -.> load ./hello.test.u -.> add -.> move.term hello.tests tests +scratch/main> load ./hello.u +scratch/main> add +scratch/main> load ./hello.test.u +scratch/main> add +scratch/main> move.term hello.tests tests ``` diff --git a/exercises/practice/isogram/.meta/testAnnotation.json b/exercises/practice/isogram/.meta/testAnnotation.json index 3682f8f..d8135d8 100644 --- a/exercises/practice/isogram/.meta/testAnnotation.json +++ b/exercises/practice/isogram/.meta/testAnnotation.json @@ -1,58 +1,58 @@ [ { - "test_code": "isogram.test.ex1 = let\n Test.label \"Empty string\" <| Test.expect (isIsogram \"\" === true)", - "name": "isogram.test.ex1" + "name": "Empty string", + "test_code": "let\n Test.label.deprecated \"Empty string\" <| Test.expect (isIsogram \"\" === true)" }, { - "test_code": "isogram.test.ex2 = let\n Test.label \"Isogram with only lower case characters\" <| Test.expect (isIsogram \"isogram\" === true)", - "name": "isogram.test.ex2" + "name": "Isogram with only lower case characters", + "test_code": "let\n Test.label.deprecated \"Isogram with only lower case characters\" <| Test.expect (isIsogram \"isogram\" === true)" }, { - "test_code": "isogram.test.ex3 = let\n Test.label \"Word with one duplicated character\" <| Test.expect (isIsogram \"eleven\" === false)", - "name": "isogram.test.ex3" + "name": "Word with one duplicated character", + "test_code": "let\n Test.label.deprecated \"Word with one duplicated character\" <| Test.expect (isIsogram \"eleven\" === false)" }, { - "test_code": "isogram.test.ex4 = let\n Test.label \"Word with one duplicated character from the end of the alphabet\" <| Test.expect (isIsogram \"zzyzx\" === false)", - "name": "isogram.test.ex4" + "name": "Word with one duplicated character from the end of the alphabet", + "test_code": "let\n Test.label.deprecated \"Word with one duplicated character from the end of the alphabet\" <| Test.expect (isIsogram \"zzyzx\" === false)" }, { - "test_code": "isogram.test.ex5 = let\n Test.label \"Longest reported english isogram\" <| Test.expect (isIsogram \"subdermatoglyphic\" === true)", - "name": "isogram.test.ex5" + "name": "Longest reported english isogram", + "test_code": "let\n Test.label.deprecated \"Longest reported english isogram\" <| Test.expect (isIsogram \"subdermatoglyphic\" === true)" }, { - "test_code": "isogram.test.ex6 = let\n Test.label \"Word with duplicated character in mixed case\" <| Test.expect (isIsogram \"Alphabet\" === false)", - "name": "isogram.test.ex6" + "name": "Word with duplicated character in mixed case", + "test_code": "let\n Test.label.deprecated \"Word with duplicated character in mixed case\" <| Test.expect (isIsogram \"Alphabet\" === false)" }, { - "test_code": "isogram.test.ex7 = let\n Test.label \"Word with duplicated character in mixed case, lowercase first\" <| Test.expect (isIsogram \"alphAbet\" === false)", - "name": "isogram.test.ex7" + "name": "Word with duplicated character in mixed case, lowercase first", + "test_code": "let\n Test.label.deprecated \"Word with duplicated character in mixed case, lowercase first\" <| Test.expect (isIsogram \"alphAbet\" === false)" }, { - "test_code": "isogram.test.ex8 = let\n Test.label \"Hypothetical isogrammic word with hyphen\" <| Test.expect (isIsogram \"thumbscrew-japingly\" === true)", - "name": "isogram.test.ex8" + "name": "Hypothetical isogrammic word with hyphen", + "test_code": "let\n Test.label.deprecated \"Hypothetical isogrammic word with hyphen\" <| Test.expect (isIsogram \"thumbscrew-japingly\" === true)" }, { - "test_code": "isogram.test.ex9 = let\n Test.label \"Hypothetical word with duplicated character following hyphen\" <| Test.expect (isIsogram \"thumbscrew-jappingly\" === false)", - "name": "isogram.test.ex9" + "name": "Hypothetical word with duplicated character following hyphen", + "test_code": "let\n Test.label.deprecated \"Hypothetical word with duplicated character following hyphen\" <| Test.expect (isIsogram \"thumbscrew-jappingly\" === false)" }, { - "test_code": "isogram.test.ex10 = let\n Test.label \"Isogram with duplicated hyphen\" <| Test.expect (isIsogram \"six-year-old\" === true)", - "name": "isogram.test.ex10" + "name": "Isogram with duplicated hyphen", + "test_code": "let\n Test.label.deprecated \"Isogram with duplicated hyphen\" <| Test.expect (isIsogram \"six-year-old\" === true)" }, { - "test_code": "isogram.test.ex11 = let\n Test.label \"Made-up name that is an isogram\" <| Test.expect (isIsogram \"Emily Jung Schwartzkopf\" === true)", - "name": "isogram.test.ex11" + "name": "Made-up name that is an isogram", + "test_code": "let\n Test.label.deprecated \"Made-up name that is an isogram\" <| Test.expect (isIsogram \"Emily Jung Schwartzkopf\" === true)" }, { - "test_code": "isogram.test.ex12 = let\n Test.label \"Duplicated character in the middle\" <| Test.expect (isIsogram \"accentor\" === false)", - "name": "isogram.test.ex12" + "name": "Duplicated character in the middle", + "test_code": "let\n Test.label.deprecated \"Duplicated character in the middle\" <| Test.expect (isIsogram \"accentor\" === false)" }, { - "test_code": "isogram.test.ex13 = let\n Test.label \"Same first and last characters\" <| Test.expect (isIsogram \"angola\" === false)", - "name": "isogram.test.ex13" + "name": "Same first and last characters", + "test_code": "let\n Test.label.deprecated \"Same first and last characters\" <| Test.expect (isIsogram \"angola\" === false)" }, { - "test_code": "isogram.test.ex14 = let\n Test.label \"Word with duplicated character and with two hyphens\" <| Test.expect (isIsogram \"up-to-date\" === false)", - "name": "isogram.test.ex14" + "name": "Word with duplicated character and with two hyphens", + "test_code": "let\n Test.label.deprecated \"Word with duplicated character and with two hyphens\" <| Test.expect (isIsogram \"up-to-date\" === false)" } -] +] \ No newline at end of file diff --git a/exercises/practice/isogram/.meta/testLoader.md b/exercises/practice/isogram/.meta/testLoader.md index 1a59158..cab7be3 100644 --- a/exercises/practice/isogram/.meta/testLoader.md +++ b/exercises/practice/isogram/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for isogram exercise ```ucm -.> load ./isogram.u -.> add -.> load ./isogram.test.u -.> add -.> move.term isogram.tests tests +scratch/main> load ./isogram.u +scratch/main> add +scratch/main> load ./isogram.test.u +scratch/main> add +scratch/main> move.term isogram.tests tests ``` diff --git a/exercises/practice/isogram/isogram.test.u b/exercises/practice/isogram/isogram.test.u index 3f1d817..de1a3e6 100644 --- a/exercises/practice/isogram/isogram.test.u +++ b/exercises/practice/isogram/isogram.test.u @@ -1,44 +1,44 @@ isogram.test.ex1 = let - Test.label "Empty string" <| Test.expect (isIsogram "" === true) + Test.label.deprecated "Empty string" <| Test.expect (isIsogram "" === true) isogram.test.ex2 = let - Test.label "Isogram with only lower case characters" <| Test.expect (isIsogram "isogram" === true) + Test.label.deprecated "Isogram with only lower case characters" <| Test.expect (isIsogram "isogram" === true) isogram.test.ex3 = let - Test.label "Word with one duplicated character" <| Test.expect (isIsogram "eleven" === false) + Test.label.deprecated "Word with one duplicated character" <| Test.expect (isIsogram "eleven" === false) isogram.test.ex4 = let - Test.label "Word with one duplicated character from the end of the alphabet" <| Test.expect (isIsogram "zzyzx" === false) + Test.label.deprecated "Word with one duplicated character from the end of the alphabet" <| Test.expect (isIsogram "zzyzx" === false) isogram.test.ex5 = let - Test.label "Longest reported english isogram" <| Test.expect (isIsogram "subdermatoglyphic" === true) + Test.label.deprecated "Longest reported english isogram" <| Test.expect (isIsogram "subdermatoglyphic" === true) isogram.test.ex6 = let - Test.label "Word with duplicated character in mixed case" <| Test.expect (isIsogram "Alphabet" === false) + Test.label.deprecated "Word with duplicated character in mixed case" <| Test.expect (isIsogram "Alphabet" === false) isogram.test.ex7 = let - Test.label "Word with duplicated character in mixed case, lowercase first" <| Test.expect (isIsogram "alphAbet" === false) + Test.label.deprecated "Word with duplicated character in mixed case, lowercase first" <| Test.expect (isIsogram "alphAbet" === false) isogram.test.ex8 = let - Test.label "Hypothetical isogrammic word with hyphen" <| Test.expect (isIsogram "thumbscrew-japingly" === true) + Test.label.deprecated "Hypothetical isogrammic word with hyphen" <| Test.expect (isIsogram "thumbscrew-japingly" === true) isogram.test.ex9 = let - Test.label "Hypothetical word with duplicated character following hyphen" <| Test.expect (isIsogram "thumbscrew-jappingly" === false) + Test.label.deprecated "Hypothetical word with duplicated character following hyphen" <| Test.expect (isIsogram "thumbscrew-jappingly" === false) isogram.test.ex10 = let - Test.label "Isogram with duplicated hyphen" <| Test.expect (isIsogram "six-year-old" === true) + Test.label.deprecated "Isogram with duplicated hyphen" <| Test.expect (isIsogram "six-year-old" === true) isogram.test.ex11 = let - Test.label "Made-up name that is an isogram" <| Test.expect (isIsogram "Emily Jung Schwartzkopf" === true) + Test.label.deprecated "Made-up name that is an isogram" <| Test.expect (isIsogram "Emily Jung Schwartzkopf" === true) isogram.test.ex12 = let - Test.label "Duplicated character in the middle" <| Test.expect (isIsogram "accentor" === false) + Test.label.deprecated "Duplicated character in the middle" <| Test.expect (isIsogram "accentor" === false) isogram.test.ex13 = let - Test.label "Same first and last characters" <| Test.expect (isIsogram "angola" === false) + Test.label.deprecated "Same first and last characters" <| Test.expect (isIsogram "angola" === false) isogram.test.ex14 = let - Test.label "Word with duplicated character and with two hyphens" <| Test.expect (isIsogram "up-to-date" === false) + Test.label.deprecated "Word with duplicated character and with two hyphens" <| Test.expect (isIsogram "up-to-date" === false) test> isogram.tests = runAll [ isogram.test.ex1, diff --git a/exercises/practice/kindergarten-garden/.meta/testAnnotation.json b/exercises/practice/kindergarten-garden/.meta/testAnnotation.json index 453fcc4..27f35ad 100644 --- a/exercises/practice/kindergarten-garden/.meta/testAnnotation.json +++ b/exercises/practice/kindergarten-garden/.meta/testAnnotation.json @@ -1,70 +1,70 @@ [ { - "name": "kindergartenGarden.lookupPlants.tests.ex1", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"RC\\nGG\"\n expect ([Radishes, Clover, Grass, Grass] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label \"partial garden - garden with single student\"" + "name": "partial garden - garden with single student", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"RC\\nGG\"\n expect ([Radishes, Clover, Grass, Grass] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label.deprecated \"partial garden - garden with single student\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex2", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VC\\nRC\"\n expect ([Violets, Clover, Radishes, Clover] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label \"partial garden - different garden with single student\"" + "name": "partial garden - different garden with single student", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VC\\nRC\"\n expect ([Violets, Clover, Radishes, Clover] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label.deprecated \"partial garden - different garden with single student\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex3", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCG\\nVVRC\"\n expect ([Clover, Grass, Radishes, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label \"partial garden - garden with two students\"" + "name": "partial garden - garden with two students", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCG\\nVVRC\"\n expect ([Clover, Grass, Radishes, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label.deprecated \"partial garden - garden with two students\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex4", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCCGG\\nVVCCGG\"\n expect ([Clover, Clover, Clover, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label \"partial garden - multiple students for the same garden with three students - second student's garden\"" + "name": "partial garden - multiple students for the same garden with three students - second student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCCGG\\nVVCCGG\"\n expect ([Clover, Clover, Clover, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label.deprecated \"partial garden - multiple students for the same garden with three students - second student's garden\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex5", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCCGG\\nVVCCGG\"\n expect ([Grass, Grass, Grass, Grass] === kindergartenGarden.lookupPlants \"Charlie\" garden)\n |> Test.label \"partial garden - multiple students for the same garden with three students - third student's garden\"" + "name": "partial garden - multiple students for the same garden with three students - third student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VVCCGG\\nVVCCGG\"\n expect ([Grass, Grass, Grass, Grass] === kindergartenGarden.lookupPlants \"Charlie\" garden)\n |> Test.label.deprecated \"partial garden - multiple students for the same garden with three students - third student's garden\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex6", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Radishes, Violets, Radishes] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label \"full garden - for Alice, first student's garden\"" + "name": "full garden - for Alice, first student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Radishes, Violets, Radishes] === kindergartenGarden.lookupPlants \"Alice\" garden)\n |> Test.label.deprecated \"full garden - for Alice, first student's garden\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex7", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Clover, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label \"full garden - for Bob, second student's garden\"" + "name": "full garden - for Bob, second student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Clover, Clover] === kindergartenGarden.lookupPlants \"Bob\" garden)\n |> Test.label.deprecated \"full garden - for Bob, second student's garden\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex8", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Violets, Clover, Grass] === kindergartenGarden.lookupPlants \"Charlie\" garden)\n |> Test.label \"full garden - for Charlie\"" + "name": "full garden - for Charlie", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Violets, Clover, Grass] === kindergartenGarden.lookupPlants \"Charlie\" garden)\n |> Test.label.deprecated \"full garden - for Charlie\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex9", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Radishes, Violets, Clover, Radishes] === kindergartenGarden.lookupPlants \"David\" garden)\n |> Test.label \"full garden - for David\"" + "name": "full garden - for David", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Radishes, Violets, Clover, Radishes] === kindergartenGarden.lookupPlants \"David\" garden)\n |> Test.label.deprecated \"full garden - for David\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex10", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Radishes, Grass] === kindergartenGarden.lookupPlants \"Eve\" garden)\n |> Test.label \"full garden - for Eve\"" + "name": "full garden - for Eve", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Radishes, Grass] === kindergartenGarden.lookupPlants \"Eve\" garden)\n |> Test.label.deprecated \"full garden - for Eve\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex11", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants \"Fred\" garden)\n |> Test.label \"full garden - for Fred\"" + "name": "full garden - for Fred", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants \"Fred\" garden)\n |> Test.label.deprecated \"full garden - for Fred\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex12", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Grass, Clover] === kindergartenGarden.lookupPlants \"Ginny\" garden)\n |> Test.label \"full garden - for Ginny\"" + "name": "full garden - for Ginny", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Clover, Grass, Grass, Clover] === kindergartenGarden.lookupPlants \"Ginny\" garden)\n |> Test.label.deprecated \"full garden - for Ginny\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex13", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Radishes, Radishes, Violets] === kindergartenGarden.lookupPlants \"Harriet\" garden)\n |> Test.label \"full garden - for Harriet\"" + "name": "full garden - for Harriet", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Radishes, Radishes, Violets] === kindergartenGarden.lookupPlants \"Harriet\" garden)\n |> Test.label.deprecated \"full garden - for Harriet\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex14", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants \"Ileana\" garden)\n |> Test.label \"full garden - for Ileana\"" + "name": "full garden - for Ileana", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants \"Ileana\" garden)\n |> Test.label.deprecated \"full garden - for Ileana\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex15", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Clover, Violets, Grass] === kindergartenGarden.lookupPlants \"Joseph\" garden)\n |> Test.label \"full garden - for Joseph\"" + "name": "full garden - for Joseph", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Violets, Clover, Violets, Grass] === kindergartenGarden.lookupPlants \"Joseph\" garden)\n |> Test.label.deprecated \"full garden - for Joseph\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex16", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Clover, Grass] === kindergartenGarden.lookupPlants \"Kincaid\" garden)\n |> Test.label \"full garden - for Kincaid, second to last student's garden\"" + "name": "full garden - for Kincaid, second to last student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Clover, Clover, Grass] === kindergartenGarden.lookupPlants \"Kincaid\" garden)\n |> Test.label.deprecated \"full garden - for Kincaid, second to last student's garden\"" }, { - "name": "kindergartenGarden.lookupPlants.tests.ex17", - "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Violets, Clover, Violets] === kindergartenGarden.lookupPlants \"Larry\" garden)\n |> Test.label \"full garden - for Larry, last student's garden\"" + "name": "full garden - for Larry, last student's garden", + "test_code": "garden = kindergartenGarden.tests.defaultGarden \"VRCGVVRVCGGCCGVRGCVCGCGV\\nVRCCCGCRRGVCGCRVVCVGCGCV\"\n expect ([Grass, Violets, Clover, Violets] === kindergartenGarden.lookupPlants \"Larry\" garden)\n |> Test.label.deprecated \"full garden - for Larry, last student's garden\"" } ] \ No newline at end of file diff --git a/exercises/practice/kindergarten-garden/.meta/testLoader.md b/exercises/practice/kindergarten-garden/.meta/testLoader.md index fdc195a..7a73e64 100644 --- a/exercises/practice/kindergarten-garden/.meta/testLoader.md +++ b/exercises/practice/kindergarten-garden/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for kindergarten-garden exercise ```ucm -.> load ./kindergartenGarden.u -.> add -.> load ./kindergartenGarden.test.u -.> add -.> move.term kindergartenGarden.tests tests +scratch/main> load ./kindergartenGarden.u +scratch/main> add +scratch/main> load ./kindergartenGarden.test.u +scratch/main> add +scratch/main> move.term kindergartenGarden.tests tests ``` diff --git a/exercises/practice/kindergarten-garden/kindergartenGarden.test.u b/exercises/practice/kindergarten-garden/kindergartenGarden.test.u index 884065a..3ed2df0 100644 --- a/exercises/practice/kindergarten-garden/kindergartenGarden.test.u +++ b/exercises/practice/kindergarten-garden/kindergartenGarden.test.u @@ -9,87 +9,87 @@ kindergartenGarden.tests.defaultGarden = kindergartenGarden.lookupPlants.tests.ex1 = garden = kindergartenGarden.tests.defaultGarden "RC\nGG" expect ([Radishes, Clover, Grass, Grass] === kindergartenGarden.lookupPlants "Alice" garden) - |> Test.label "partial garden - garden with single student" + |> Test.label.deprecated "partial garden - garden with single student" kindergartenGarden.lookupPlants.tests.ex2 = garden = kindergartenGarden.tests.defaultGarden "VC\nRC" expect ([Violets, Clover, Radishes, Clover] === kindergartenGarden.lookupPlants "Alice" garden) - |> Test.label "partial garden - different garden with single student" + |> Test.label.deprecated "partial garden - different garden with single student" kindergartenGarden.lookupPlants.tests.ex3 = garden = kindergartenGarden.tests.defaultGarden "VVCG\nVVRC" expect ([Clover, Grass, Radishes, Clover] === kindergartenGarden.lookupPlants "Bob" garden) - |> Test.label "partial garden - garden with two students" + |> Test.label.deprecated "partial garden - garden with two students" kindergartenGarden.lookupPlants.tests.ex4 = garden = kindergartenGarden.tests.defaultGarden "VVCCGG\nVVCCGG" expect ([Clover, Clover, Clover, Clover] === kindergartenGarden.lookupPlants "Bob" garden) - |> Test.label "partial garden - multiple students for the same garden with three students - second student's garden" + |> Test.label.deprecated "partial garden - multiple students for the same garden with three students - second student's garden" kindergartenGarden.lookupPlants.tests.ex5 = garden = kindergartenGarden.tests.defaultGarden "VVCCGG\nVVCCGG" expect ([Grass, Grass, Grass, Grass] === kindergartenGarden.lookupPlants "Charlie" garden) - |> Test.label "partial garden - multiple students for the same garden with three students - third student's garden" + |> Test.label.deprecated "partial garden - multiple students for the same garden with three students - third student's garden" kindergartenGarden.lookupPlants.tests.ex6 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Violets, Radishes, Violets, Radishes] === kindergartenGarden.lookupPlants "Alice" garden) - |> Test.label "full garden - for Alice, first student's garden" + |> Test.label.deprecated "full garden - for Alice, first student's garden" kindergartenGarden.lookupPlants.tests.ex7 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Clover, Grass, Clover, Clover] === kindergartenGarden.lookupPlants "Bob" garden) - |> Test.label "full garden - for Bob, second student's garden" + |> Test.label.deprecated "full garden - for Bob, second student's garden" kindergartenGarden.lookupPlants.tests.ex8 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Violets, Violets, Clover, Grass] === kindergartenGarden.lookupPlants "Charlie" garden) - |> Test.label "full garden - for Charlie" + |> Test.label.deprecated "full garden - for Charlie" kindergartenGarden.lookupPlants.tests.ex9 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Radishes, Violets, Clover, Radishes] === kindergartenGarden.lookupPlants "David" garden) - |> Test.label "full garden - for David" + |> Test.label.deprecated "full garden - for David" kindergartenGarden.lookupPlants.tests.ex10 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Clover, Grass, Radishes, Grass] === kindergartenGarden.lookupPlants "Eve" garden) - |> Test.label "full garden - for Eve" + |> Test.label.deprecated "full garden - for Eve" kindergartenGarden.lookupPlants.tests.ex11 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants "Fred" garden) - |> Test.label "full garden - for Fred" + |> Test.label.deprecated "full garden - for Fred" kindergartenGarden.lookupPlants.tests.ex12 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Clover, Grass, Grass, Clover] === kindergartenGarden.lookupPlants "Ginny" garden) - |> Test.label "full garden - for Ginny" + |> Test.label.deprecated "full garden - for Ginny" kindergartenGarden.lookupPlants.tests.ex13 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Violets, Radishes, Radishes, Violets] === kindergartenGarden.lookupPlants "Harriet" garden) - |> Test.label "full garden - for Harriet" + |> Test.label.deprecated "full garden - for Harriet" kindergartenGarden.lookupPlants.tests.ex14 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Grass, Clover, Violets, Clover] === kindergartenGarden.lookupPlants "Ileana" garden) - |> Test.label "full garden - for Ileana" + |> Test.label.deprecated "full garden - for Ileana" kindergartenGarden.lookupPlants.tests.ex15 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Violets, Clover, Violets, Grass] === kindergartenGarden.lookupPlants "Joseph" garden) - |> Test.label "full garden - for Joseph" + |> Test.label.deprecated "full garden - for Joseph" kindergartenGarden.lookupPlants.tests.ex16 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Grass, Clover, Clover, Grass] === kindergartenGarden.lookupPlants "Kincaid" garden) - |> Test.label "full garden - for Kincaid, second to last student's garden" + |> Test.label.deprecated "full garden - for Kincaid, second to last student's garden" kindergartenGarden.lookupPlants.tests.ex17 = garden = kindergartenGarden.tests.defaultGarden "VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV" expect ([Grass, Violets, Clover, Violets] === kindergartenGarden.lookupPlants "Larry" garden) - |> Test.label "full garden - for Larry, last student's garden" + |> Test.label.deprecated "full garden - for Larry, last student's garden" test> kindergartenGarden.tests = runAll [ kindergartenGarden.lookupPlants.tests.ex1, diff --git a/exercises/practice/knapsack/.meta/testAnnotation.json b/exercises/practice/knapsack/.meta/testAnnotation.json index daf89f1..b168c82 100644 --- a/exercises/practice/knapsack/.meta/testAnnotation.json +++ b/exercises/practice/knapsack/.meta/testAnnotation.json @@ -1,30 +1,30 @@ [ { - "test_code": "knapsack.test.ex1 = let\n\tTest.label \"No items\" <| Test.expect (maximumValue 100 [] === 0)", - "name": "knapsack.test.ex1" + "name": "No items", + "test_code": "let\n\tTest.label.deprecated \"No items\" <| Test.expect (maximumValue 100 [] === 0)" }, { - "test_code": "knapsack.test.ex2 = let\n\tTest.label \"One item - too heavy\" <| Test.expect (maximumValue 10 [(100, 1)] === 0)", - "name": "knapsack.test.ex2" + "name": "One item - too heavy", + "test_code": "let\n\tTest.label.deprecated \"One item - too heavy\" <| Test.expect (maximumValue 10 [(100, 1)] === 0)" }, { - "test_code": "knapsack.test.ex3 = let\n\tTest.label \"Five items - cannot be greedy by weight\" <| Test.expect (maximumValue 10 [(2, 5), (2, 5), (2, 5), (2, 5), (10, 21)] === 21)", - "name": "knapsack.test.ex3" + "name": "Five items - cannot be greedy by weight", + "test_code": "let\n\tTest.label.deprecated \"Five items - cannot be greedy by weight\" <| Test.expect (maximumValue 10 [(2, 5), (2, 5), (2, 5), (2, 5), (10, 21)] === 21)" }, { - "test_code": "knapsack.test.ex4 = let\n\tTest.label \"Five items - cannot be greedy by value\" <| Test.expect (maximumValue 10 [(2, 20), (2, 20), (2, 20), (2, 20), (10, 50)] === 80)", - "name": "knapsack.test.ex4" + "name": "Five items - cannot be greedy by value", + "test_code": "let\n\tTest.label.deprecated \"Five items - cannot be greedy by value\" <| Test.expect (maximumValue 10 [(2, 20), (2, 20), (2, 20), (2, 20), (10, 50)] === 80)" }, { - "test_code": "knapsack.test.ex5 = let\n\tTest.label \"Example knapsack\" <| Test.expect (maximumValue 10 [(5, 10), (4, 40), (6, 30), (4, 50)] === 90)", - "name": "knapsack.test.ex5" + "name": "Example knapsack", + "test_code": "let\n\tTest.label.deprecated \"Example knapsack\" <| Test.expect (maximumValue 10 [(5, 10), (4, 40), (6, 30), (4, 50)] === 90)" }, { - "test_code": "knapsack.test.ex6 = let\n\tTest.label \"Eight items\" <| Test.expect (maximumValue 104 [(25, 350), (35, 400), (45, 450), (5, 20), (25, 70), (3, 8), (2, 5), (2, 5)] === 900)", - "name": "knapsack.test.ex6" + "name": "Eight items", + "test_code": "let\n\tTest.label.deprecated \"Eight items\" <| Test.expect (maximumValue 104 [(25, 350), (35, 400), (45, 450), (5, 20), (25, 70), (3, 8), (2, 5), (2, 5)] === 900)" }, { - "test_code": "knapsack.test.ex7 = let\n\tTest.label \"Fifteen items\" <| Test.expect (maximumValue 750 [(70, 135), (73, 139), (77, 149), (80, 150), (82, 156), (87, 163), (90, 173), (94, 184), (98, 192), (106, 201), (110, 210), (113, 214), (115, 221), (118, 229), (120, 240)] === 1458)", - "name": "knapsack.test.ex7" + "name": "Fifteen items", + "test_code": "let\n\tTest.label.deprecated \"Fifteen items\" <| Test.expect (maximumValue 750 [(70, 135), (73, 139), (77, 149), (80, 150), (82, 156), (87, 163), (90, 173), (94, 184), (98, 192), (106, 201), (110, 210), (113, 214), (115, 221), (118, 229), (120, 240)] === 1458)" } -] +] \ No newline at end of file diff --git a/exercises/practice/knapsack/.meta/testLoader.md b/exercises/practice/knapsack/.meta/testLoader.md index c9e35fe..66a119b 100644 --- a/exercises/practice/knapsack/.meta/testLoader.md +++ b/exercises/practice/knapsack/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./knapsack.u -.> add -.> load ./knapsack.test.u -.> add -.> move.term knapsack.tests tests +scratch/main> load ./knapsack.u +scratch/main> add +scratch/main> load ./knapsack.test.u +scratch/main> add +scratch/main> move.term knapsack.tests tests ``` diff --git a/exercises/practice/knapsack/knapsack.test.u b/exercises/practice/knapsack/knapsack.test.u index d9664ce..3b33a75 100644 --- a/exercises/practice/knapsack/knapsack.test.u +++ b/exercises/practice/knapsack/knapsack.test.u @@ -1,23 +1,23 @@ knapsack.test.ex1 = let - Test.label "No items" <| Test.expect (maximumValue 100 [] === 0) + Test.label.deprecated "No items" <| Test.expect (maximumValue 100 [] === 0) knapsack.test.ex2 = let - Test.label "One item - too heavy" <| Test.expect (maximumValue 10 [(100, 1)] === 0) + Test.label.deprecated "One item - too heavy" <| Test.expect (maximumValue 10 [(100, 1)] === 0) knapsack.test.ex3 = let - Test.label "Five items - cannot be greedy by weight" <| Test.expect (maximumValue 10 [(2, 5), (2, 5), (2, 5), (2, 5), (10, 21)] === 21) + Test.label.deprecated "Five items - cannot be greedy by weight" <| Test.expect (maximumValue 10 [(2, 5), (2, 5), (2, 5), (2, 5), (10, 21)] === 21) knapsack.test.ex4 = let - Test.label "Five items - cannot be greedy by value" <| Test.expect (maximumValue 10 [(2, 20), (2, 20), (2, 20), (2, 20), (10, 50)] === 80) + Test.label.deprecated "Five items - cannot be greedy by value" <| Test.expect (maximumValue 10 [(2, 20), (2, 20), (2, 20), (2, 20), (10, 50)] === 80) knapsack.test.ex5 = let - Test.label "Example knapsack" <| Test.expect (maximumValue 10 [(5, 10), (4, 40), (6, 30), (4, 50)] === 90) + Test.label.deprecated "Example knapsack" <| Test.expect (maximumValue 10 [(5, 10), (4, 40), (6, 30), (4, 50)] === 90) knapsack.test.ex6 = let - Test.label "Eight items" <| Test.expect (maximumValue 104 [(25, 350), (35, 400), (45, 450), (5, 20), (25, 70), (3, 8), (2, 5), (2, 5)] === 900) + Test.label.deprecated "Eight items" <| Test.expect (maximumValue 104 [(25, 350), (35, 400), (45, 450), (5, 20), (25, 70), (3, 8), (2, 5), (2, 5)] === 900) knapsack.test.ex7 = let - Test.label "Fifteen items" <| Test.expect (maximumValue 750 [(70, 135), (73, 139), (77, 149), (80, 150), (82, 156), (87, 163), (90, 173), (94, 184), (98, 192), (106, 201), (110, 210), (113, 214), (115, 221), (118, 229), (120, 240)] === 1458) + Test.label.deprecated "Fifteen items" <| Test.expect (maximumValue 750 [(70, 135), (73, 139), (77, 149), (80, 150), (82, 156), (87, 163), (90, 173), (94, 184), (98, 192), (106, 201), (110, 210), (113, 214), (115, 221), (118, 229), (120, 240)] === 1458) test> knapsack.tests = runAll [ knapsack.test.ex1, diff --git a/exercises/practice/largest-series-product/.meta/testAnnotation.json b/exercises/practice/largest-series-product/.meta/testAnnotation.json index 280eaf4..93b788c 100644 --- a/exercises/practice/largest-series-product/.meta/testAnnotation.json +++ b/exercises/practice/largest-series-product/.meta/testAnnotation.json @@ -1,62 +1,62 @@ [ { - "test_code": "largestSeriesProduct.test.ex1 = let\n digits = \"29\"\n span = +2\n Test.label \"Finds the largest product if span equals length\" <| Test.expect (largestProduct digits span === Some 18)", - "name": "largestSeriesProduct.test.ex1" + "name": "Finds the largest product if span equals length", + "test_code": "let\n digits = \"29\"\n span = +2\n Test.label.deprecated \"Finds the largest product if span equals length\" <| Test.expect (largestProduct digits span === Some 18)" }, { - "test_code": "largestSeriesProduct.test.ex2 = let\n digits = \"0123456789\"\n span = +2\n Test.label \"Can find the largest product of 2 with numbers in order\" <| Test.expect (largestProduct digits span === Some 72)", - "name": "largestSeriesProduct.test.ex2" + "name": "Can find the largest product of 2 with numbers in order", + "test_code": "let\n digits = \"0123456789\"\n span = +2\n Test.label.deprecated \"Can find the largest product of 2 with numbers in order\" <| Test.expect (largestProduct digits span === Some 72)" }, { - "test_code": "largestSeriesProduct.test.ex3 = let\n digits = \"576802143\"\n span = +2\n Test.label \"Can find the largest product of 2\" <| Test.expect (largestProduct digits span === Some 48)", - "name": "largestSeriesProduct.test.ex3" + "name": "Can find the largest product of 2", + "test_code": "let\n digits = \"576802143\"\n span = +2\n Test.label.deprecated \"Can find the largest product of 2\" <| Test.expect (largestProduct digits span === Some 48)" }, { - "test_code": "largestSeriesProduct.test.ex4 = let\n digits = \"0123456789\"\n span = +3\n Test.label \"Can find the largest product of 3 with numbers in order\" <| Test.expect (largestProduct digits span === Some 504)", - "name": "largestSeriesProduct.test.ex4" + "name": "Can find the largest product of 3 with numbers in order", + "test_code": "let\n digits = \"0123456789\"\n span = +3\n Test.label.deprecated \"Can find the largest product of 3 with numbers in order\" <| Test.expect (largestProduct digits span === Some 504)" }, { - "test_code": "largestSeriesProduct.test.ex5 = let\n digits = \"1027839564\"\n span = +3\n Test.label \"Can find the largest product of 3\" <| Test.expect (largestProduct digits span === Some 270)", - "name": "largestSeriesProduct.test.ex5" + "name": "Can find the largest product of 3", + "test_code": "let\n digits = \"1027839564\"\n span = +3\n Test.label.deprecated \"Can find the largest product of 3\" <| Test.expect (largestProduct digits span === Some 270)" }, { - "test_code": "largestSeriesProduct.test.ex6 = let\n digits = \"0123456789\"\n span = +5\n Test.label \"Can find the largest product of 5 with numbers in order\" <| Test.expect (largestProduct digits span === Some 15120)", - "name": "largestSeriesProduct.test.ex6" + "name": "Can find the largest product of 5 with numbers in order", + "test_code": "let\n digits = \"0123456789\"\n span = +5\n Test.label.deprecated \"Can find the largest product of 5 with numbers in order\" <| Test.expect (largestProduct digits span === Some 15120)" }, { - "test_code": "largestSeriesProduct.test.ex7 = let\n digits = \"73167176531330624919225119674426574742355349194934\"\n span = +6\n Test.label \"Can get the largest product of a big number\" <| Test.expect (largestProduct digits span === Some 23520)", - "name": "largestSeriesProduct.test.ex7" + "name": "Can get the largest product of a big number", + "test_code": "let\n digits = \"73167176531330624919225119674426574742355349194934\"\n span = +6\n Test.label.deprecated \"Can get the largest product of a big number\" <| Test.expect (largestProduct digits span === Some 23520)" }, { - "test_code": "largestSeriesProduct.test.ex8 = let\n digits = \"0000\"\n span = +2\n Test.label \"Reports zero if the only digits are zero\" <| Test.expect (largestProduct digits span === Some 0)", - "name": "largestSeriesProduct.test.ex8" + "name": "Reports zero if the only digits are zero", + "test_code": "let\n digits = \"0000\"\n span = +2\n Test.label.deprecated \"Reports zero if the only digits are zero\" <| Test.expect (largestProduct digits span === Some 0)" }, { - "test_code": "largestSeriesProduct.test.ex9 = let\n digits = \"99099\"\n span = +3\n Test.label \"Reports zero if all spans include zero\" <| Test.expect (largestProduct digits span === Some 0)", - "name": "largestSeriesProduct.test.ex9" + "name": "Reports zero if all spans include zero", + "test_code": "let\n digits = \"99099\"\n span = +3\n Test.label.deprecated \"Reports zero if all spans include zero\" <| Test.expect (largestProduct digits span === Some 0)" }, { - "test_code": "largestSeriesProduct.test.ex10 = let\n digits = \"123\"\n span = +4\n Test.label \"Rejects span longer than string length\" <| Test.expect (largestProduct digits span === None)", - "name": "largestSeriesProduct.test.ex10" + "name": "Rejects span longer than string length", + "test_code": "let\n digits = \"123\"\n span = +4\n Test.label.deprecated \"Rejects span longer than string length\" <| Test.expect (largestProduct digits span === None)" }, { - "test_code": "largestSeriesProduct.test.ex11 = let\n digits = \"\"\n span = +0\n Test.label \"Reports 1 for empty string and empty product (0 span)\" <| Test.expect (largestProduct digits span === Some 1)", - "name": "largestSeriesProduct.test.ex11" + "name": "Reports 1 for empty string and empty product (0 span)", + "test_code": "let\n digits = \"\"\n span = +0\n Test.label.deprecated \"Reports 1 for empty string and empty product (0 span)\" <| Test.expect (largestProduct digits span === Some 1)" }, { - "test_code": "largestSeriesProduct.test.ex12 = let\n digits = \"123\"\n span = +0\n Test.label \"Reports 1 for nonempty string and empty product (0 span)\" <| Test.expect (largestProduct digits span === Some 1)", - "name": "largestSeriesProduct.test.ex12" + "name": "Reports 1 for nonempty string and empty product (0 span)", + "test_code": "let\n digits = \"123\"\n span = +0\n Test.label.deprecated \"Reports 1 for nonempty string and empty product (0 span)\" <| Test.expect (largestProduct digits span === Some 1)" }, { - "test_code": "largestSeriesProduct.test.ex13 = let\n digits = \"\"\n span = +1\n Test.label \"Rejects empty string and nonzero span\" <| Test.expect (largestProduct digits span === None)", - "name": "largestSeriesProduct.test.ex13" + "name": "Rejects empty string and nonzero span", + "test_code": "let\n digits = \"\"\n span = +1\n Test.label.deprecated \"Rejects empty string and nonzero span\" <| Test.expect (largestProduct digits span === None)" }, { - "test_code": "largestSeriesProduct.test.ex14 = let\n digits = \"1234a5\"\n span = +2\n Test.label \"Rejects invalid character in digits\" <| Test.expect (largestProduct digits span === None)", - "name": "largestSeriesProduct.test.ex14" + "name": "Rejects invalid character in digits", + "test_code": "let\n digits = \"1234a5\"\n span = +2\n Test.label.deprecated \"Rejects invalid character in digits\" <| Test.expect (largestProduct digits span === None)" }, { - "test_code": "largestSeriesProduct.test.ex15 = let\n digits = \"12345\"\n span = -1\n Test.label \"Rejects negative span\" <| Test.expect (largestProduct digits span === None)", - "name": "largestSeriesProduct.test.ex15" + "name": "Rejects negative span", + "test_code": "let\n digits = \"12345\"\n span = -1\n Test.label.deprecated \"Rejects negative span\" <| Test.expect (largestProduct digits span === None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/largest-series-product/.meta/testLoader.md b/exercises/practice/largest-series-product/.meta/testLoader.md index 60a087f..528f36c 100644 --- a/exercises/practice/largest-series-product/.meta/testLoader.md +++ b/exercises/practice/largest-series-product/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for largest-series-product exercise ```ucm -.> load ./largestSeriesProduct.u -.> add -.> load ./largestSeriesProduct.test.u -.> add -.> move.term largestSeriesProduct.tests tests +scratch/main> load ./largestSeriesProduct.u +scratch/main> add +scratch/main> load ./largestSeriesProduct.test.u +scratch/main> add +scratch/main> move.term largestSeriesProduct.tests tests ``` diff --git a/exercises/practice/largest-series-product/largestSeriesProduct.test.u b/exercises/practice/largest-series-product/largestSeriesProduct.test.u index 219376f..7af0d78 100644 --- a/exercises/practice/largest-series-product/largestSeriesProduct.test.u +++ b/exercises/practice/largest-series-product/largestSeriesProduct.test.u @@ -1,77 +1,77 @@ largestSeriesProduct.test.ex1 = let digits = "29" span = +2 - Test.label "Finds the largest product if span equals length" <| Test.expect (largestProduct digits span === Some 18) - + Test.label.deprecated "Finds the largest product if span equals length" <| Test.expect (largestProduct digits span === Some 18) + largestSeriesProduct.test.ex2 = let digits = "0123456789" span = +2 - Test.label "Can find the largest product of 2 with numbers in order" <| Test.expect (largestProduct digits span === Some 72) + Test.label.deprecated "Can find the largest product of 2 with numbers in order" <| Test.expect (largestProduct digits span === Some 72) largestSeriesProduct.test.ex3 = let digits = "576802143" span = +2 - Test.label "Can find the largest product of 2" <| Test.expect (largestProduct digits span === Some 48) + Test.label.deprecated "Can find the largest product of 2" <| Test.expect (largestProduct digits span === Some 48) largestSeriesProduct.test.ex4 = let digits = "0123456789" span = +3 - Test.label "Can find the largest product of 3 with numbers in order" <| Test.expect (largestProduct digits span === Some 504) + Test.label.deprecated "Can find the largest product of 3 with numbers in order" <| Test.expect (largestProduct digits span === Some 504) largestSeriesProduct.test.ex5 = let digits = "1027839564" span = +3 - Test.label "Can find the largest product of 3" <| Test.expect (largestProduct digits span === Some 270) + Test.label.deprecated "Can find the largest product of 3" <| Test.expect (largestProduct digits span === Some 270) largestSeriesProduct.test.ex6 = let digits = "0123456789" span = +5 - Test.label "Can find the largest product of 5 with numbers in order" <| Test.expect (largestProduct digits span === Some 15120) + Test.label.deprecated "Can find the largest product of 5 with numbers in order" <| Test.expect (largestProduct digits span === Some 15120) largestSeriesProduct.test.ex7 = let digits = "73167176531330624919225119674426574742355349194934" span = +6 - Test.label "Can get the largest product of a big number" <| Test.expect (largestProduct digits span === Some 23520) + Test.label.deprecated "Can get the largest product of a big number" <| Test.expect (largestProduct digits span === Some 23520) largestSeriesProduct.test.ex8 = let digits = "0000" span = +2 - Test.label "Reports zero if the only digits are zero" <| Test.expect (largestProduct digits span === Some 0) + Test.label.deprecated "Reports zero if the only digits are zero" <| Test.expect (largestProduct digits span === Some 0) largestSeriesProduct.test.ex9 = let digits = "99099" span = +3 - Test.label "Reports zero if all spans include zero" <| Test.expect (largestProduct digits span === Some 0) + Test.label.deprecated "Reports zero if all spans include zero" <| Test.expect (largestProduct digits span === Some 0) largestSeriesProduct.test.ex10 = let digits = "123" span = +4 - Test.label "Rejects span longer than string length" <| Test.expect (largestProduct digits span === None) + Test.label.deprecated "Rejects span longer than string length" <| Test.expect (largestProduct digits span === None) largestSeriesProduct.test.ex11 = let digits = "" span = +0 - Test.label "Reports 1 for empty string and empty product (0 span)" <| Test.expect (largestProduct digits span === Some 1) + Test.label.deprecated "Reports 1 for empty string and empty product (0 span)" <| Test.expect (largestProduct digits span === Some 1) largestSeriesProduct.test.ex12 = let digits = "123" span = +0 - Test.label "Reports 1 for nonempty string and empty product (0 span)" <| Test.expect (largestProduct digits span === Some 1) + Test.label.deprecated "Reports 1 for nonempty string and empty product (0 span)" <| Test.expect (largestProduct digits span === Some 1) largestSeriesProduct.test.ex13 = let digits = "" span = +1 - Test.label "Rejects empty string and nonzero span" <| Test.expect (largestProduct digits span === None) + Test.label.deprecated "Rejects empty string and nonzero span" <| Test.expect (largestProduct digits span === None) largestSeriesProduct.test.ex14 = let digits = "1234a5" span = +2 - Test.label "Rejects invalid character in digits" <| Test.expect (largestProduct digits span === None) + Test.label.deprecated "Rejects invalid character in digits" <| Test.expect (largestProduct digits span === None) largestSeriesProduct.test.ex15 = let digits = "12345" span = -1 - Test.label "Rejects negative span" <| Test.expect (largestProduct digits span === None) + Test.label.deprecated "Rejects negative span" <| Test.expect (largestProduct digits span === None) test> largestSeriesProduct.tests = runAll [ largestSeriesProduct.test.ex1, diff --git a/exercises/practice/leap/.meta/testAnnotation.json b/exercises/practice/leap/.meta/testAnnotation.json index bf1fbe1..6bd2428 100644 --- a/exercises/practice/leap/.meta/testAnnotation.json +++ b/exercises/practice/leap/.meta/testAnnotation.json @@ -1,38 +1,38 @@ [ { - "name":"leap.test.t1", - "test_code":"Test.label \"leap should be false when year is not divisible by 4\" (Test.expect ((leap 2015) === false))" + "name": "leap should be false when year is not divisible by 4", + "test_code": "Test.label.deprecated \"leap should be false when year is not divisible by 4\" (Test.expect ((leap 2015) === false))" }, { - "name":"leap.test.t2", - "test_code":"Test.label \"leap should be false when year is divisible by 2 not divisible by 4\" (Test.expect ((leap 1970) === false))" + "name": "leap should be false when year is divisible by 2 not divisible by 4", + "test_code": "Test.label.deprecated \"leap should be false when year is divisible by 2 not divisible by 4\" (Test.expect ((leap 1970) === false))" }, { - "name":"leap.test.t3", - "test_code":"Test.label \"leap should be true when year is divisible by 4\" (Test.expect ((leap 1964) === true))" + "name": "leap should be true when year is divisible by 4", + "test_code": "Test.label.deprecated \"leap should be true when year is divisible by 4\" (Test.expect ((leap 1964) === true))" }, { - "name":"leap.test.t4", - "test_code":"Test.label \"leap should be true when year divisible by 4, not divisible by 100\" (Test.expect ((leap 1996)=== true))" + "name": "leap should be true when year divisible by 4, not divisible by 100", + "test_code": "Test.label.deprecated \"leap should be true when year divisible by 4, not divisible by 100\" (Test.expect ((leap 1996)=== true))" }, { - "name":"leap.test.t5", - "test_code":"Test.label \"leap should be true when year divisible by 4 and 5\" (Test.expect ((leap 1960)=== true))" + "name": "leap should be true when year divisible by 4 and 5", + "test_code": "Test.label.deprecated \"leap should be true when year divisible by 4 and 5\" (Test.expect ((leap 1960)=== true))" }, { - "name":"leap.test.t6", - "test_code":"Test.label \"leap should be false when year divisible by 100, not divisible by 400\" (Test.expect ((leap 2100)=== false))" + "name": "leap should be false when year divisible by 100, not divisible by 400", + "test_code": "Test.label.deprecated \"leap should be false when year divisible by 100, not divisible by 400\" (Test.expect ((leap 2100)=== false))" }, { - "name":"leap.test.t7", - "test_code":"Test.label \"leap should be true when year divisible by 400 and 100\" (Test.expect ((leap 2000) === true))" + "name": "leap should be true when year divisible by 400 and 100", + "test_code": "Test.label.deprecated \"leap should be true when year divisible by 400 and 100\" (Test.expect ((leap 2000) === true))" }, { - "name":"leap.test.t8", - "test_code":"Test.label \"leap should be false when year divisible by 4 and 100\" (Test.expect ((leap 1900) === false))" + "name": "leap should be false when year divisible by 4 and 100", + "test_code": "Test.label.deprecated \"leap should be false when year divisible by 4 and 100\" (Test.expect ((leap 1900) === false))" }, { - "name":"leap.test.t9", - "test_code":"Test.label \"leap should be false when year divisible by 200, not divisble by 400\" (Test.expect ((leap 1800) === false))" + "name": "leap should be false when year divisible by 200, not divisble by 400", + "test_code": "Test.label.deprecated \"leap should be false when year divisible by 200, not divisble by 400\" (Test.expect ((leap 1800) === false))" } - ] +] \ No newline at end of file diff --git a/exercises/practice/leap/.meta/testLoader.md b/exercises/practice/leap/.meta/testLoader.md index ee4f154..871f907 100644 --- a/exercises/practice/leap/.meta/testLoader.md +++ b/exercises/practice/leap/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for hello exercise ```ucm -.> load ./leap.u -.> add -.> load ./leap.test.u -.> add -.> move.term leap.tests tests +scratch/main> load ./leap.u +scratch/main> add +scratch/main> load ./leap.test.u +scratch/main> add +scratch/main> move.term leap.tests tests ``` diff --git a/exercises/practice/leap/leap.test.u b/exercises/practice/leap/leap.test.u index 534055d..4d9921c 100644 --- a/exercises/practice/leap/leap.test.u +++ b/exercises/practice/leap/leap.test.u @@ -1,29 +1,29 @@ leap.test.t1 = - Test.label "leap should be false when year is not divisible by 4" (Test.expect ((leap 2015) === false)) + Test.label.deprecated "leap should be false when year is not divisible by 4" (Test.expect ((leap 2015) === false)) leap.test.t2 = - Test.label "leap should be false when year is divisible by 2 not divisible by 4" (Test.expect ((leap 1970) === false)) + Test.label.deprecated "leap should be false when year is divisible by 2 not divisible by 4" (Test.expect ((leap 1970) === false)) leap.test.t3 = - Test.label "leap should be true when year is divisible by 4" (Test.expect ((leap 1964) === true)) + Test.label.deprecated "leap should be true when year is divisible by 4" (Test.expect ((leap 1964) === true)) leap.test.t4 = - Test.label "leap should be true when year divisible by 4, not divisible by 100" (Test.expect ((leap 1996)=== true)) + Test.label.deprecated "leap should be true when year divisible by 4, not divisible by 100" (Test.expect ((leap 1996)=== true)) leap.test.t5 = - Test.label "leap should be true when year divisible by 4 and 5" (Test.expect ((leap 1960)=== true)) + Test.label.deprecated "leap should be true when year divisible by 4 and 5" (Test.expect ((leap 1960)=== true)) leap.test.t6 = - Test.label "leap should be false when year divisible by 100, not divisible by 400" (Test.expect ((leap 2100)=== false)) + Test.label.deprecated "leap should be false when year divisible by 100, not divisible by 400" (Test.expect ((leap 2100)=== false)) leap.test.t7 = - Test.label "leap should be true when year divisible by 400 and 100" (Test.expect ((leap 2000) === true)) + Test.label.deprecated "leap should be true when year divisible by 400 and 100" (Test.expect ((leap 2000) === true)) leap.test.t8 = - Test.label "leap should be false when year divisible by 4 and 100" (Test.expect ((leap 1900) === false)) + Test.label.deprecated "leap should be false when year divisible by 4 and 100" (Test.expect ((leap 1900) === false)) leap.test.t9 = - Test.label "leap should be false when year divisible by 200, not divisble by 400" (Test.expect ((leap 1800) === false)) + Test.label.deprecated "leap should be false when year divisible by 200, not divisble by 400" (Test.expect ((leap 1800) === false)) test> leap.tests = diff --git a/exercises/practice/list-ops/.meta/testAnnotation.json b/exercises/practice/list-ops/.meta/testAnnotation.json index 6abf4d9..be32611 100644 --- a/exercises/practice/list-ops/.meta/testAnnotation.json +++ b/exercises/practice/list-ops/.meta/testAnnotation.json @@ -1,90 +1,90 @@ [ { - "name": "listOps.append.tests.ex1", - "test_code": "Test.expect ([] === (listOps.append [] []))\n |> Test.label \"append entries to a list and return the new list - empty lists\"" + "name": "append entries to a list and return the new list - empty lists", + "test_code": "Test.expect ([] === (listOps.append [] []))\n |> Test.label.deprecated \"append entries to a list and return the new list - empty lists\"" }, { - "name": "listOps.append.tests.ex2", - "test_code": "Test.expect ([1, 2, 3, 4] === listOps.append [] [1, 2, 3, 4])\n |> Test.label \"append entries to a list and return the new list - list to empty list\"" + "name": "append entries to a list and return the new list - list to empty list", + "test_code": "Test.expect ([1, 2, 3, 4] === listOps.append [] [1, 2, 3, 4])\n |> Test.label.deprecated \"append entries to a list and return the new list - list to empty list\"" }, { - "name": "listOps.append.tests.ex3", - "test_code": "Test.expect ([1, 2, 3, 4] === listOps.append [1, 2, 3, 4] [])\n |> Test.label \"append entries to a list and return the new list - empty list to list\"" + "name": "append entries to a list and return the new list - empty list to list", + "test_code": "Test.expect ([1, 2, 3, 4] === listOps.append [1, 2, 3, 4] [])\n |> Test.label.deprecated \"append entries to a list and return the new list - empty list to list\"" }, { - "name": "listOps.append.tests.ex4", - "test_code": "Test.expect ([1, 2, 2, 3, 4, 5] === listOps.append [1, 2] [2, 3, 4, 5])\n |> Test.label \"append entries to a list and return the new list - non-empty lists\"" + "name": "append entries to a list and return the new list - non-empty lists", + "test_code": "Test.expect ([1, 2, 2, 3, 4, 5] === listOps.append [1, 2] [2, 3, 4, 5])\n |> Test.label.deprecated \"append entries to a list and return the new list - non-empty lists\"" }, { - "name": "listOps.concat.tests.ex1", - "test_code": "Test.expect ([] === listOps.concat [])\n |> Test.label \"concatenate a list of lists - empty list\"" + "name": "concatenate a list of lists - empty list", + "test_code": "Test.expect ([] === listOps.concat [])\n |> Test.label.deprecated \"concatenate a list of lists - empty list\"" }, { - "name": "listOps.concat.tests.ex2", - "test_code": "Test.expect ([1, 2, 3, 4, 5, 6] === listOps.concat [[1, 2], [3], [], [4, 5, 6]])\n |> Test.label \"concatenate a list of lists - list of lists\"" + "name": "concatenate a list of lists - list of lists", + "test_code": "Test.expect ([1, 2, 3, 4, 5, 6] === listOps.concat [[1, 2], [3], [], [4, 5, 6]])\n |> Test.label.deprecated \"concatenate a list of lists - list of lists\"" }, { - "name": "listOps.concat.tests.ex3", - "test_code": "Test.expect ([[1], [2], [3], [], [4, 5, 6]] === listOps.concat [[[1], [2]], [[3]], [[]], [[4, 5, 6]]])\n |> Test.label \"concatenate a list of lists - list of nested lists\"" + "name": "concatenate a list of lists - list of nested lists", + "test_code": "Test.expect ([[1], [2], [3], [], [4, 5, 6]] === listOps.concat [[[1], [2]], [[3]], [[]], [[4, 5, 6]]])\n |> Test.label.deprecated \"concatenate a list of lists - list of nested lists\"" }, { - "name": "listOps.filter.tests.ex1", - "test_code": "Test.expect ([] === listOps.filter (x -> 1 == mod x 2) [])\n |> Test.label \"filter list returning only values that satisfy the filter function - empty list\"" + "name": "filter list returning only values that satisfy the filter function - empty list", + "test_code": "Test.expect ([] === listOps.filter (x -> 1 == mod x 2) [])\n |> Test.label.deprecated \"filter list returning only values that satisfy the filter function - empty list\"" }, { - "name": "listOps.filter.tests.ex2", - "test_code": "Test.expect ([1, 3, 5] === listOps.filter (x -> 1 == mod x 2) [1, 2, 3, 5])\n |> Test.label \"filter list returning only values that satisfy the filter function - non-empty list\"" + "name": "filter list returning only values that satisfy the filter function - non-empty list", + "test_code": "Test.expect ([1, 3, 5] === listOps.filter (x -> 1 == mod x 2) [1, 2, 3, 5])\n |> Test.label.deprecated \"filter list returning only values that satisfy the filter function - non-empty list\"" }, { - "name": "listOps.foldl.tests.ex1", - "test_code": "use Nat *\n Test.expect (2 == listOps.foldl (acc el -> el * acc) 2 [])\n |> Test.label \"folds (reduces) the given list from the left with a function - empty list\"" + "name": "folds (reduces) the given list from the left with a function - empty list", + "test_code": "use Nat *\n Test.expect (2 == listOps.foldl (acc el -> el * acc) 2 [])\n |> Test.label.deprecated \"folds (reduces) the given list from the left with a function - empty list\"" }, { - "name": "listOps.foldl.tests.ex2", - "test_code": "use Nat +\n Test.expect (15 == listOps.foldl (acc el -> el + acc) 5 [1, 2, 3, 4])\n |> Test.label \"folds (reduces) the given list from the left with a function - direction independent function applied to non-empty list\"" + "name": "folds (reduces) the given list from the left with a function - direction independent function applied to non-empty list", + "test_code": "use Nat +\n Test.expect (15 == listOps.foldl (acc el -> el + acc) 5 [1, 2, 3, 4])\n |> Test.label.deprecated \"folds (reduces) the given list from the left with a function - direction independent function applied to non-empty list\"" }, { - "name": "listOps.foldl.tests.ex3", - "test_code": "use Float /\n Test.expect (64.0 == listOps.foldl (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0])\n |> Test.label \"folds (reduces) the given list from the left with a function - direction dependent function applied to non-empty list\"" + "name": "folds (reduces) the given list from the left with a function - direction dependent function applied to non-empty list", + "test_code": "use Float /\n Test.expect (64.0 == listOps.foldl (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0])\n |> Test.label.deprecated \"folds (reduces) the given list from the left with a function - direction dependent function applied to non-empty list\"" }, { - "name": "listOps.foldr.tests.ex1", - "test_code": "use Nat *\n Test.expect (2 == listOps.foldr (acc el -> el * acc) 2 [])\n |> Test.label \"folds (reduces) the given list from the right with a function - empty list\"" + "name": "folds (reduces) the given list from the right with a function - empty list", + "test_code": "use Nat *\n Test.expect (2 == listOps.foldr (acc el -> el * acc) 2 [])\n |> Test.label.deprecated \"folds (reduces) the given list from the right with a function - empty list\"" }, { - "name": "listOps.foldr.tests.ex2", - "test_code": "use Nat +\n Test.expect (15 == listOps.foldr (acc el -> el + acc) 5 [1, 2, 3, 4])\n |> Test.label \"folds (reduces) the given list from the right with a function - direction independent function applied to non-empty list\"" + "name": "folds (reduces) the given list from the right with a function - direction independent function applied to non-empty list", + "test_code": "use Nat +\n Test.expect (15 == listOps.foldr (acc el -> el + acc) 5 [1, 2, 3, 4])\n |> Test.label.deprecated \"folds (reduces) the given list from the right with a function - direction independent function applied to non-empty list\"" }, { - "name": "listOps.foldr.tests.ex3", - "test_code": "use Float /\n Test.expect (9.0 == listOps.foldr (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0])\n |> Test.label \"folds (reduces) the given list from the right with a function - direction dependent function applied to non-empty list\"" + "name": "folds (reduces) the given list from the right with a function - direction dependent function applied to non-empty list", + "test_code": "use Float /\n Test.expect (9.0 == listOps.foldr (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0])\n |> Test.label.deprecated \"folds (reduces) the given list from the right with a function - direction dependent function applied to non-empty list\"" }, { - "name": "listOps.length.tests.ex1", - "test_code": "Test.expect (0 == listOps.length [])\n |> Test.label \"returns the length of a list - empty list\"" + "name": "returns the length of a list - empty list", + "test_code": "Test.expect (0 == listOps.length [])\n |> Test.label.deprecated \"returns the length of a list - empty list\"" }, { - "name": "listOps.length.tests.ex2", - "test_code": "Test.expect (4 == listOps.length [1, 2, 3, 4])\n |> Test.label \"returns the length of a list - non-empty list\"" + "name": "returns the length of a list - non-empty list", + "test_code": "Test.expect (4 == listOps.length [1, 2, 3, 4])\n |> Test.label.deprecated \"returns the length of a list - non-empty list\"" }, { - "name": "listOps.map.tests.ex1", - "test_code": "Test.expect ([] === listOps.map (x -> x + 1) [])\n |> Test.label \"return a list of elements whose values equal the list value transformed by the mapping function - empty list\"" + "name": "return a list of elements whose values equal the list value transformed by the mapping function - empty list", + "test_code": "Test.expect ([] === listOps.map (x -> x + 1) [])\n |> Test.label.deprecated \"return a list of elements whose values equal the list value transformed by the mapping function - empty list\"" }, { - "name": "listOps.map.tests.ex2", - "test_code": "Test.expect ([2, 4, 6, 8] === listOps.map (x -> x + 1) [1, 3, 5, 7])\n |> Test.label \"return a list of elements whose values equal the list value transformed by the mapping function - non-empty list\"" + "name": "return a list of elements whose values equal the list value transformed by the mapping function - non-empty list", + "test_code": "Test.expect ([2, 4, 6, 8] === listOps.map (x -> x + 1) [1, 3, 5, 7])\n |> Test.label.deprecated \"return a list of elements whose values equal the list value transformed by the mapping function - non-empty list\"" }, { - "name": "listOps.reverse.tests.ex1", - "test_code": "Test.expect ([] === listOps.reverse [])\n |> Test.label \"reverse the elements of the list - empty list\"" + "name": "reverse the elements of the list - empty list", + "test_code": "Test.expect ([] === listOps.reverse [])\n |> Test.label.deprecated \"reverse the elements of the list - empty list\"" }, { - "name": "listOps.reverse.tests.ex2", - "test_code": "Test.expect ([7, 5, 3, 1] === listOps.reverse [1, 3, 5, 7])\n |> Test.label \"reverse the elements of the list - non-empty list\"" + "name": "reverse the elements of the list - non-empty list", + "test_code": "Test.expect ([7, 5, 3, 1] === listOps.reverse [1, 3, 5, 7])\n |> Test.label.deprecated \"reverse the elements of the list - non-empty list\"" }, { - "name": "listOps.reverse.tests.ex3", - "test_code": "Test.expect ([[4, 5, 6], [], [3], [1, 2]] === listOps.reverse [[1, 2], [3], [], [4, 5, 6]])\n |> Test.label \"reverse the elements of the list - list of lists is not flattened\"" + "name": "reverse the elements of the list - list of lists is not flattened", + "test_code": "Test.expect ([[4, 5, 6], [], [3], [1, 2]] === listOps.reverse [[1, 2], [3], [], [4, 5, 6]])\n |> Test.label.deprecated \"reverse the elements of the list - list of lists is not flattened\"" } -] +] \ No newline at end of file diff --git a/exercises/practice/list-ops/.meta/testLoader.md b/exercises/practice/list-ops/.meta/testLoader.md index 6cddbc2..4371e73 100644 --- a/exercises/practice/list-ops/.meta/testLoader.md +++ b/exercises/practice/list-ops/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for list-ops exercise ```ucm -.> load ./listOps.u -.> add -.> load ./listOps.test.u -.> add -.> move.term listOps.tests tests +scratch/main> load ./listOps.u +scratch/main> add +scratch/main> load ./listOps.test.u +scratch/main> add +scratch/main> move.term listOps.tests tests ``` diff --git a/exercises/practice/list-ops/listOps.test.u b/exercises/practice/list-ops/listOps.test.u index 3d97bef..ec69898 100644 --- a/exercises/practice/list-ops/listOps.test.u +++ b/exercises/practice/list-ops/listOps.test.u @@ -1,96 +1,96 @@ listOps.append.tests.ex1 = Test.expect ([] === (listOps.append [] [])) - |> Test.label "append entries to a list and return the new list - empty lists" + |> Test.label.deprecated "append entries to a list and return the new list - empty lists" listOps.append.tests.ex2 = Test.expect ([1, 2, 3, 4] === listOps.append [] [1, 2, 3, 4]) - |> Test.label "append entries to a list and return the new list - list to empty list" + |> Test.label.deprecated "append entries to a list and return the new list - list to empty list" listOps.append.tests.ex3 = Test.expect ([1, 2, 3, 4] === listOps.append [1, 2, 3, 4] []) - |> Test.label "append entries to a list and return the new list - empty list to list" + |> Test.label.deprecated "append entries to a list and return the new list - empty list to list" listOps.append.tests.ex4 = Test.expect ([1, 2, 2, 3, 4, 5] === listOps.append [1, 2] [2, 3, 4, 5]) - |> Test.label "append entries to a list and return the new list - non-empty lists" + |> Test.label.deprecated "append entries to a list and return the new list - non-empty lists" listOps.concat.tests.ex1 = Test.expect ([] === listOps.concat []) - |> Test.label "concatenate a list of lists - empty list" + |> Test.label.deprecated "concatenate a list of lists - empty list" listOps.concat.tests.ex2 = Test.expect ([1, 2, 3, 4, 5, 6] === listOps.concat [[1, 2], [3], [], [4, 5, 6]]) - |> Test.label "concatenate a list of lists - list of lists" + |> Test.label.deprecated "concatenate a list of lists - list of lists" listOps.concat.tests.ex3 = Test.expect ([[1], [2], [3], [], [4, 5, 6]] === listOps.concat [[[1], [2]], [[3]], [[]], [[4, 5, 6]]]) - |> Test.label "concatenate a list of lists - list of nested lists" + |> Test.label.deprecated "concatenate a list of lists - list of nested lists" listOps.filter.tests.ex1 = Test.expect ([] === listOps.filter (x -> 1 == mod x 2) []) - |> Test.label "filter list returning only values that satisfy the filter function - empty list" + |> Test.label.deprecated "filter list returning only values that satisfy the filter function - empty list" listOps.filter.tests.ex2 = Test.expect ([1, 3, 5] === listOps.filter (x -> 1 == mod x 2) [1, 2, 3, 5]) - |> Test.label "filter list returning only values that satisfy the filter function - non-empty list" + |> Test.label.deprecated "filter list returning only values that satisfy the filter function - non-empty list" listOps.foldl.tests.ex1 = use Nat * Test.expect (2 == listOps.foldl (acc el -> el * acc) 2 []) - |> Test.label "folds (reduces) the given list from the left with a function - empty list" + |> Test.label.deprecated "folds (reduces) the given list from the left with a function - empty list" listOps.foldl.tests.ex2 = use Nat + Test.expect (15 == listOps.foldl (acc el -> el + acc) 5 [1, 2, 3, 4]) - |> Test.label "folds (reduces) the given list from the left with a function - direction independent function applied to non-empty list" + |> Test.label.deprecated "folds (reduces) the given list from the left with a function - direction independent function applied to non-empty list" listOps.foldl.tests.ex3 = use Float / Test.expect (64.0 == listOps.foldl (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0]) - |> Test.label "folds (reduces) the given list from the left with a function - direction dependent function applied to non-empty list" + |> Test.label.deprecated "folds (reduces) the given list from the left with a function - direction dependent function applied to non-empty list" listOps.foldr.tests.ex1 = use Nat * Test.expect (2 == listOps.foldr (acc el -> el * acc) 2 []) - |> Test.label "folds (reduces) the given list from the right with a function - empty list" + |> Test.label.deprecated "folds (reduces) the given list from the right with a function - empty list" listOps.foldr.tests.ex2 = use Nat + Test.expect (15 == listOps.foldr (acc el -> el + acc) 5 [1, 2, 3, 4]) - |> Test.label "folds (reduces) the given list from the right with a function - direction independent function applied to non-empty list" + |> Test.label.deprecated "folds (reduces) the given list from the right with a function - direction independent function applied to non-empty list" listOps.foldr.tests.ex3 = use Float / Test.expect (9.0 == listOps.foldr (acc el -> el / acc) 24.0 [1.0, 2.0, 3.0, 4.0]) - |> Test.label "folds (reduces) the given list from the right with a function - direction dependent function applied to non-empty list" + |> Test.label.deprecated "folds (reduces) the given list from the right with a function - direction dependent function applied to non-empty list" listOps.length.tests.ex1 = Test.expect (0 == listOps.length []) - |> Test.label "returns the length of a list - empty list" + |> Test.label.deprecated "returns the length of a list - empty list" listOps.length.tests.ex2 = Test.expect (4 == listOps.length [1, 2, 3, 4]) - |> Test.label "returns the length of a list - non-empty list" + |> Test.label.deprecated "returns the length of a list - non-empty list" listOps.map.tests.ex1 = Test.expect ([] === listOps.map (x -> x + 1) []) - |> Test.label "return a list of elements whose values equal the list value transformed by the mapping function - empty list" + |> Test.label.deprecated "return a list of elements whose values equal the list value transformed by the mapping function - empty list" listOps.map.tests.ex2 = Test.expect ([2, 4, 6, 8] === listOps.map (x -> x + 1) [1, 3, 5, 7]) - |> Test.label "return a list of elements whose values equal the list value transformed by the mapping function - non-empty list" + |> Test.label.deprecated "return a list of elements whose values equal the list value transformed by the mapping function - non-empty list" listOps.reverse.tests.ex1 = Test.expect ([] === listOps.reverse []) - |> Test.label "reverse the elements of the list - empty list" + |> Test.label.deprecated "reverse the elements of the list - empty list" listOps.reverse.tests.ex2 = Test.expect ([7, 5, 3, 1] === listOps.reverse [1, 3, 5, 7]) - |> Test.label "reverse the elements of the list - non-empty list" + |> Test.label.deprecated "reverse the elements of the list - non-empty list" listOps.reverse.tests.ex3 = Test.expect ([[4, 5, 6], [], [3], [1, 2]] === listOps.reverse [[1, 2], [3], [], [4, 5, 6]]) - |> Test.label "reverse the elements of the list - list of lists is not flattened" + |> Test.label.deprecated "reverse the elements of the list - list of lists is not flattened" test> listOps.tests = runAll [ listOps.append.tests.ex1, diff --git a/exercises/practice/luhn/.meta/testAnnotation.json b/exercises/practice/luhn/.meta/testAnnotation.json index d195ef5..cc1d028 100644 --- a/exercises/practice/luhn/.meta/testAnnotation.json +++ b/exercises/practice/luhn/.meta/testAnnotation.json @@ -1,90 +1,90 @@ [ { - "name": "luhn.isValid.tests.ex1", - "test_code": "expect (false == luhn.isValid \"1\")\n |> Test.label \"single digit strings can not be valid\"" + "name": "single digit strings can not be valid", + "test_code": "expect (false == luhn.isValid \"1\")\n |> Test.label.deprecated \"single digit strings can not be valid\"" }, { - "name": "luhn.isValid.tests.ex2", - "test_code": "expect (false == luhn.isValid \"0\")\n |> Test.label \"a single zero is invalid\"" + "name": "a single zero is invalid", + "test_code": "expect (false == luhn.isValid \"0\")\n |> Test.label.deprecated \"a single zero is invalid\"" }, { - "name": "luhn.isValid.tests.ex3", - "test_code": "expect (true == luhn.isValid \"059\")\n |> Test.label \"a simple valid SIN that remains valid if reversed\"" + "name": "a simple valid SIN that remains valid if reversed", + "test_code": "expect (true == luhn.isValid \"059\")\n |> Test.label.deprecated \"a simple valid SIN that remains valid if reversed\"" }, { - "name": "luhn.isValid.tests.ex4", - "test_code": "expect (true == luhn.isValid \"59\")\n |> Test.label \"a simple valid SIN that becomes invalid if reversed\"" + "name": "a simple valid SIN that becomes invalid if reversed", + "test_code": "expect (true == luhn.isValid \"59\")\n |> Test.label.deprecated \"a simple valid SIN that becomes invalid if reversed\"" }, { - "name": "luhn.isValid.tests.ex5", - "test_code": "expect (true == luhn.isValid \"055 444 285\")\n |> Test.label \"a valid Canadian SIN\"" + "name": "a valid Canadian SIN", + "test_code": "expect (true == luhn.isValid \"055 444 285\")\n |> Test.label.deprecated \"a valid Canadian SIN\"" }, { - "name": "luhn.isValid.tests.ex6", - "test_code": "expect (false == luhn.isValid \"055 444 286\")\n |> Test.label \"invalid Canadian SIN\"" + "name": "invalid Canadian SIN", + "test_code": "expect (false == luhn.isValid \"055 444 286\")\n |> Test.label.deprecated \"invalid Canadian SIN\"" }, { - "name": "luhn.isValid.tests.ex7", - "test_code": "expect (false == luhn.isValid \"8273 1232 7352 0569\")\n |> Test.label \"invalid credit card\"" + "name": "invalid credit card", + "test_code": "expect (false == luhn.isValid \"8273 1232 7352 0569\")\n |> Test.label.deprecated \"invalid credit card\"" }, { - "name": "luhn.isValid.tests.ex8", - "test_code": "expect (false == luhn.isValid \"1 2345 6789 1234 5678 9012\")\n |> Test.label \"invalid long number with an even remainder\"" + "name": "invalid long number with an even remainder", + "test_code": "expect (false == luhn.isValid \"1 2345 6789 1234 5678 9012\")\n |> Test.label.deprecated \"invalid long number with an even remainder\"" }, { - "name": "luhn.isValid.tests.ex9", - "test_code": "expect (false == luhn.isValid \"1 2345 6789 1234 5678 9013\")\n |> Test.label \"invalid long number with a remainder divisible by 5\"" + "name": "invalid long number with a remainder divisible by 5", + "test_code": "expect (false == luhn.isValid \"1 2345 6789 1234 5678 9013\")\n |> Test.label.deprecated \"invalid long number with a remainder divisible by 5\"" }, { - "name": "luhn.isValid.tests.ex10", - "test_code": "expect (true == luhn.isValid \"095 245 88\")\n |> Test.label \"valid number with an even number of digits\"" + "name": "valid number with an even number of digits", + "test_code": "expect (true == luhn.isValid \"095 245 88\")\n |> Test.label.deprecated \"valid number with an even number of digits\"" }, { - "name": "luhn.isValid.tests.ex11", - "test_code": "expect (true == luhn.isValid \"234 567 891 234\")\n |> Test.label \"valid number with an odd number of spaces\"" + "name": "valid number with an odd number of spaces", + "test_code": "expect (true == luhn.isValid \"234 567 891 234\")\n |> Test.label.deprecated \"valid number with an odd number of spaces\"" }, { - "name": "luhn.isValid.tests.ex12", - "test_code": "expect (false == luhn.isValid \"059a\")\n |> Test.label \"valid strings with a non-digit added at the end become invalid\"" + "name": "valid strings with a non-digit added at the end become invalid", + "test_code": "expect (false == luhn.isValid \"059a\")\n |> Test.label.deprecated \"valid strings with a non-digit added at the end become invalid\"" }, { - "name": "luhn.isValid.tests.ex13", - "test_code": "expect (false == luhn.isValid \"055-444-285\")\n |> Test.label \"valid strings with punctuation included become invalid\"" + "name": "valid strings with punctuation included become invalid", + "test_code": "expect (false == luhn.isValid \"055-444-285\")\n |> Test.label.deprecated \"valid strings with punctuation included become invalid\"" }, { - "name": "luhn.isValid.tests.ex14", - "test_code": "expect (false == luhn.isValid \"055# 444$ 285\")\n |> Test.label \"valid strings with symbols included become invalid\"" + "name": "valid strings with symbols included become invalid", + "test_code": "expect (false == luhn.isValid \"055# 444$ 285\")\n |> Test.label.deprecated \"valid strings with symbols included become invalid\"" }, { - "name": "luhn.isValid.tests.ex15", - "test_code": "expect (false == luhn.isValid \" 0\")\n |> Test.label \"single zero with space is invalid\"" + "name": "single zero with space is invalid", + "test_code": "expect (false == luhn.isValid \" 0\")\n |> Test.label.deprecated \"single zero with space is invalid\"" }, { - "name": "luhn.isValid.tests.ex16", - "test_code": "expect (true == luhn.isValid \"0000 0\")\n |> Test.label \"more than a single zero is valid\"" + "name": "more than a single zero is valid", + "test_code": "expect (true == luhn.isValid \"0000 0\")\n |> Test.label.deprecated \"more than a single zero is valid\"" }, { - "name": "luhn.isValid.tests.ex17", - "test_code": "expect (true == luhn.isValid \"091\")\n |> Test.label \"input digit 9 is correctly converted to output digit 9\"" + "name": "input digit 9 is correctly converted to output digit 9", + "test_code": "expect (true == luhn.isValid \"091\")\n |> Test.label.deprecated \"input digit 9 is correctly converted to output digit 9\"" }, { - "name": "luhn.isValid.tests.ex18", - "test_code": "expect (true == luhn.isValid \"9999999999 9999999999 9999999999 9999999999\")\n |> Test.label \"very long input is valid\"" + "name": "very long input is valid", + "test_code": "expect (true == luhn.isValid \"9999999999 9999999999 9999999999 9999999999\")\n |> Test.label.deprecated \"very long input is valid\"" }, { - "name": "luhn.isValid.tests.ex19", - "test_code": "expect (true == luhn.isValid \"109\")\n |> Test.label \"valid luhn with an odd number of digits and non zero first digit\"" + "name": "valid luhn with an odd number of digits and non zero first digit", + "test_code": "expect (true == luhn.isValid \"109\")\n |> Test.label.deprecated \"valid luhn with an odd number of digits and non zero first digit\"" }, { - "name": "luhn.isValid.tests.ex20", - "test_code": "expect (false == luhn.isValid \"055b 444 285\")\n |> Test.label \"using ascii value for non-doubled non-digit isn't allowed\"" + "name": "using ascii value for non-doubled non-digit isn't allowed", + "test_code": "expect (false == luhn.isValid \"055b 444 285\")\n |> Test.label.deprecated \"using ascii value for non-doubled non-digit isn't allowed\"" }, { - "name": "luhn.isValid.tests.ex21", - "test_code": "expect (false == luhn.isValid \":9\")\n |> Test.label \"using ascii value for doubled non-digit isn't allowed\"" + "name": "using ascii value for doubled non-digit isn't allowed", + "test_code": "expect (false == luhn.isValid \":9\")\n |> Test.label.deprecated \"using ascii value for doubled non-digit isn't allowed\"" }, { - "name": "luhn.isValid.tests.ex22", - "test_code": "expect (false == luhn.isValid \"59%59\")\n |> Test.label \"non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed\"" + "name": "non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed", + "test_code": "expect (false == luhn.isValid \"59%59\")\n |> Test.label.deprecated \"non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed\"" } -] +] \ No newline at end of file diff --git a/exercises/practice/luhn/.meta/testLoader.md b/exercises/practice/luhn/.meta/testLoader.md index cdad641..df9c678 100644 --- a/exercises/practice/luhn/.meta/testLoader.md +++ b/exercises/practice/luhn/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for luhn exercise ```ucm -.> load ./luhn.u -.> add -.> load ./luhn.test.u -.> add -.> move.term luhn.tests tests +scratch/main> load ./luhn.u +scratch/main> add +scratch/main> load ./luhn.test.u +scratch/main> add +scratch/main> move.term luhn.tests tests ``` diff --git a/exercises/practice/luhn/luhn.test.u b/exercises/practice/luhn/luhn.test.u index fc83624..e9d1011 100644 --- a/exercises/practice/luhn/luhn.test.u +++ b/exercises/practice/luhn/luhn.test.u @@ -1,90 +1,90 @@ luhn.isValid.tests.ex1 = expect (false == luhn.isValid "1") - |> Test.label "single digit strings can not be valid" + |> Test.label.deprecated "single digit strings can not be valid" luhn.isValid.tests.ex2 = expect (false == luhn.isValid "0") - |> Test.label "a single zero is invalid" + |> Test.label.deprecated "a single zero is invalid" luhn.isValid.tests.ex3 = expect (true == luhn.isValid "059") - |> Test.label "a simple valid SIN that remains valid if reversed" + |> Test.label.deprecated "a simple valid SIN that remains valid if reversed" luhn.isValid.tests.ex4 = expect (true == luhn.isValid "59") - |> Test.label "a simple valid SIN that becomes invalid if reversed" + |> Test.label.deprecated "a simple valid SIN that becomes invalid if reversed" luhn.isValid.tests.ex5 = expect (true == luhn.isValid "055 444 285") - |> Test.label "a valid Canadian SIN" + |> Test.label.deprecated "a valid Canadian SIN" luhn.isValid.tests.ex6 = expect (false == luhn.isValid "055 444 286") - |> Test.label "invalid Canadian SIN" + |> Test.label.deprecated "invalid Canadian SIN" luhn.isValid.tests.ex7 = expect (false == luhn.isValid "8273 1232 7352 0569") - |> Test.label "invalid credit card" + |> Test.label.deprecated "invalid credit card" luhn.isValid.tests.ex8 = expect (false == luhn.isValid "1 2345 6789 1234 5678 9012") - |> Test.label "invalid long number with an even remainder" + |> Test.label.deprecated "invalid long number with an even remainder" luhn.isValid.tests.ex9 = expect (false == luhn.isValid "1 2345 6789 1234 5678 9013") - |> Test.label "invalid long number with a remainder divisible by 5" + |> Test.label.deprecated "invalid long number with a remainder divisible by 5" luhn.isValid.tests.ex10 = expect (true == luhn.isValid "095 245 88") - |> Test.label "valid number with an even number of digits" + |> Test.label.deprecated "valid number with an even number of digits" luhn.isValid.tests.ex11 = expect (true == luhn.isValid "234 567 891 234") - |> Test.label "valid number with an odd number of spaces" + |> Test.label.deprecated "valid number with an odd number of spaces" luhn.isValid.tests.ex12 = expect (false == luhn.isValid "059a") - |> Test.label "valid strings with a non-digit added at the end become invalid" + |> Test.label.deprecated "valid strings with a non-digit added at the end become invalid" luhn.isValid.tests.ex13 = expect (false == luhn.isValid "055-444-285") - |> Test.label "valid strings with punctuation included become invalid" + |> Test.label.deprecated "valid strings with punctuation included become invalid" luhn.isValid.tests.ex14 = expect (false == luhn.isValid "055# 444$ 285") - |> Test.label "valid strings with symbols included become invalid" + |> Test.label.deprecated "valid strings with symbols included become invalid" luhn.isValid.tests.ex15 = expect (false == luhn.isValid " 0") - |> Test.label "single zero with space is invalid" + |> Test.label.deprecated "single zero with space is invalid" luhn.isValid.tests.ex16 = expect (true == luhn.isValid "0000 0") - |> Test.label "more than a single zero is valid" + |> Test.label.deprecated "more than a single zero is valid" luhn.isValid.tests.ex17 = expect (true == luhn.isValid "091") - |> Test.label "input digit 9 is correctly converted to output digit 9" + |> Test.label.deprecated "input digit 9 is correctly converted to output digit 9" luhn.isValid.tests.ex18 = expect (true == luhn.isValid "9999999999 9999999999 9999999999 9999999999") - |> Test.label "very long input is valid" + |> Test.label.deprecated "very long input is valid" luhn.isValid.tests.ex19 = expect (true == luhn.isValid "109") - |> Test.label "valid luhn with an odd number of digits and non zero first digit" + |> Test.label.deprecated "valid luhn with an odd number of digits and non zero first digit" luhn.isValid.tests.ex20 = expect (false == luhn.isValid "055b 444 285") - |> Test.label "using ascii value for non-doubled non-digit isn't allowed" + |> Test.label.deprecated "using ascii value for non-doubled non-digit isn't allowed" luhn.isValid.tests.ex21 = expect (false == luhn.isValid ":9") - |> Test.label "using ascii value for doubled non-digit isn't allowed" + |> Test.label.deprecated "using ascii value for doubled non-digit isn't allowed" luhn.isValid.tests.ex22 = expect (false == luhn.isValid "59%59") - |> Test.label "non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed" + |> Test.label.deprecated "non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed" test> luhn.tests = runAll [ luhn.isValid.tests.ex1, diff --git a/exercises/practice/majority-element/.meta/examples/majorityElement.example.u b/exercises/practice/majority-element/.meta/examples/majorityElement.example.u index 0978bb6..b38d8ab 100644 --- a/exercises/practice/majority-element/.meta/examples/majorityElement.example.u +++ b/exercises/practice/majority-element/.meta/examples/majorityElement.example.u @@ -1,6 +1,6 @@ unique type majorityElement.Color = Red | Orange | Yellow | Green | Blue | Purple -majorityElement.majorityFinder : [Color] -> Optional Color +majorityElement.majorityFinder : [majorityElement.Color] -> Optional majorityElement.Color majorityElement.majorityFinder colors = res _ = List.map (c -> !(update c)) colors (Counter colorTup, r) = MyStore.runWith (Counter None) res diff --git a/exercises/practice/majority-element/.meta/testAnnotation.json b/exercises/practice/majority-element/.meta/testAnnotation.json index 07f0380..62e0506 100644 --- a/exercises/practice/majority-element/.meta/testAnnotation.json +++ b/exercises/practice/majority-element/.meta/testAnnotation.json @@ -1,26 +1,26 @@ [ { - "name": "majorityElement.test.ex1", - "test_code": "majorityElement.test.ex1 = let\n\tTest.label \"should find the simple majority in a list\" <| Test.expect (majorityFinder [Red, Blue, Red, Red, Yellow] === (Some Red))" + "name": "should find the simple majority in a list", + "test_code": "let\n Test.label.deprecated \"should find the simple majority in a list\" <| Test.expect (majorityFinder [Red, Blue, Red, Red, Yellow] === (Some Red))" }, { - "name": "majorityElement.test.ex2", - "test_code": "majorityElement.test.ex2 = let\n\tTest.label \"should not return value if no majority exists\" <| Test.expect (majorityFinder [Red, Blue, Green, Yellow] === None)" + "name": "should not return value if no majority exists", + "test_code": "let\n Test.label.deprecated \"should not return value if no majority exists\" <| Test.expect (majorityFinder [Red, Blue, Green, Yellow] === None)" }, { - "name": "majorityElement.test.ex3", - "test_code": "majorityElement.test.ex3 = let\n\tTest.label \"should not return value if most common element is exactly n/2\" <| Test.expect (majorityFinder [Red, Blue, Red, Green, Red, Yellow] === None)" + "name": "should not return value if most common element is exactly n/2", + "test_code": "let\n Test.label.deprecated \"should not return value if most common element is exactly n/2\" <| Test.expect (majorityFinder [Red, Blue, Red, Green, Red, Yellow] === None)" }, { - "name": "majorityElement.test.ex4", - "test_code": "majorityElement.test.ex4 = let\n\tTest.label \"should not return value if 50/50 split\" <| Test.expect (majorityFinder [Red, Red, Blue, Blue, Red, Blue] === None)" + "name": "should not return value if 50/50 split", + "test_code": "let\n Test.label.deprecated \"should not return value if 50/50 split\" <| Test.expect (majorityFinder [Red, Red, Blue, Blue, Red, Blue] === None)" }, { - "name": "majorityElement.test.ex5", - "test_code": "majorityElement.test.ex5 = let\n\tTest.label \"should handle empty list case\" <| Test.expect (majorityFinder [] === None)" + "name": "should handle empty list case", + "test_code": "let\n Test.label.deprecated \"should handle empty list case\" <| Test.expect (majorityFinder [] === None)" }, { "name": "majorityElement.test.ex6 _", - "test_code": "majorityElement.test.ex6 _ = let\n\tall = [Red, Orange, Yellow, Green, Blue]\n\tselection = !(gen.oneOf all)\n\tfillN = !(gen.natIn 0 (List.size all))\n\tmostCommonElems = List.fill fillN selection\n\ttestList = all List.++ mostCommonElems\n\t-- fill + 1 because the element exists in the original list one time\n\texpected = if ((fillN + 1) > ((List.size testList) / 2) ) then Some selection else None\n\tTest.label \"should handle wide distribution of inputs\" <| Test.expect (majorityFinder testList === expected)" + "test_code": "let\n all = [Red, Orange, Yellow, Green, Blue]\n selection = !(gen.oneOf all)\n fillN = !(gen.natIn 0 (List.size all))\n mostCommonElems = List.fill fillN selection\n testList = all List.++ mostCommonElems\n -- fill + 1 because the element exists in the original list one time\n expected = if ((fillN + 1) > ((List.size testList) / 2) ) then Some selection else None" } -] +] \ No newline at end of file diff --git a/exercises/practice/majority-element/.meta/testLoader.md b/exercises/practice/majority-element/.meta/testLoader.md index a648963..8a23370 100644 --- a/exercises/practice/majority-element/.meta/testLoader.md +++ b/exercises/practice/majority-element/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for hello exercise ```ucm -.> load ./majorityElement.u -.> add -.> load ./majorityElement.test.u -.> add -.> move.term majorityElement.tests tests +scratch/main> load ./majorityElement.u +scratch/main> add +scratch/main> load ./majorityElement.test.u +scratch/main> add +scratch/main> move.term majorityElement.tests tests ``` diff --git a/exercises/practice/majority-element/majorityElement.test.u b/exercises/practice/majority-element/majorityElement.test.u index de7c22f..1fb66a6 100644 --- a/exercises/practice/majority-element/majorityElement.test.u +++ b/exercises/practice/majority-element/majorityElement.test.u @@ -1,19 +1,19 @@ use majorityElement.Color majorityElement.test.ex1 = let - Test.label "should find the simple majority in a list" <| Test.expect (majorityFinder [Red, Blue, Red, Red, Yellow] === (Some Red)) + Test.label.deprecated "should find the simple majority in a list" <| Test.expect (majorityFinder [Red, Blue, Red, Red, Yellow] === (Some Red)) majorityElement.test.ex2 = let - Test.label "should not return value if no majority exists" <| Test.expect (majorityFinder [Red, Blue, Green, Yellow] === None) + Test.label.deprecated "should not return value if no majority exists" <| Test.expect (majorityFinder [Red, Blue, Green, Yellow] === None) majorityElement.test.ex3 = let - Test.label "should not return value if most common element is exactly n/2" <| Test.expect (majorityFinder [Red, Blue, Red, Green, Red, Yellow] === None) + Test.label.deprecated "should not return value if most common element is exactly n/2" <| Test.expect (majorityFinder [Red, Blue, Red, Green, Red, Yellow] === None) majorityElement.test.ex4 = let - Test.label "should not return value if 50/50 split" <| Test.expect (majorityFinder [Red, Red, Blue, Blue, Red, Blue] === None) + Test.label.deprecated "should not return value if 50/50 split" <| Test.expect (majorityFinder [Red, Red, Blue, Blue, Red, Blue] === None) majorityElement.test.ex5 = let - Test.label "should handle empty list case" <| Test.expect (majorityFinder [] === None) + Test.label.deprecated "should handle empty list case" <| Test.expect (majorityFinder [] === None) majorityElement.test.ex6 _ = let all = [Red, Orange, Yellow, Green, Blue] @@ -24,6 +24,6 @@ majorityElement.test.ex6 _ = let -- fill + 1 because the element exists in the original list one time expected = if ((fillN + 1) > ((List.size testList) / 2) ) then Some selection else None - Test.label "should handle wide distribution of inputs" <| Test.expect (majorityFinder testList === expected) + Test.label.deprecated "should handle wide distribution of inputs" <| Test.expect (majorityFinder testList === expected) test> majorityElement.tests = Test.run ex1 ++ Test.run ex2 ++ Test.run ex3 ++ Test.run ex4 ++ Test.run ex5 ++ (runs 20 ex6) diff --git a/exercises/practice/majority-element/majorityElement.u b/exercises/practice/majority-element/majorityElement.u index 2a1dba1..1a45d04 100644 --- a/exercises/practice/majority-element/majorityElement.u +++ b/exercises/practice/majority-element/majorityElement.u @@ -1,6 +1,6 @@ unique type majorityElement.Color = Red | Orange | Yellow | Green | Blue | Purple -majorityElement.majorityFinder : [Color] -> Optional Color +majorityElement.majorityFinder : [majorityElement.Color] -> Optional majorityElement.Color majorityElement.majorityFinder colors = todo "implement majorityFinder" diff --git a/exercises/practice/matching-brackets/.meta/examples/matchingBrackets.example.u b/exercises/practice/matching-brackets/.meta/examples/matchingBrackets.example.u index 92f7cc1..0aff208 100644 --- a/exercises/practice/matching-brackets/.meta/examples/matchingBrackets.example.u +++ b/exercises/practice/matching-brackets/.meta/examples/matchingBrackets.example.u @@ -46,11 +46,11 @@ checkBalance = cases [] -> Stack.isEmpty head +: tail -> match bracketType head with Open -> - push head + Stack.push head checkBalance tail Close -> checkCloses = closes head - pop + Stack.pop checkCloses && (checkBalance tail) Other -> checkBalance tail diff --git a/exercises/practice/matching-brackets/.meta/testAnnotation.json b/exercises/practice/matching-brackets/.meta/testAnnotation.json index 019e913..475648c 100644 --- a/exercises/practice/matching-brackets/.meta/testAnnotation.json +++ b/exercises/practice/matching-brackets/.meta/testAnnotation.json @@ -1,78 +1,78 @@ [ { - "test_code": "matchingBrackets.test.ex1 = let\n\tTest.label \"paired square brackets\" <| Test.expect (isPaired \"[]\" === true)", - "name": "matchingBrackets.test.ex1" + "name": "paired square brackets", + "test_code": "let\n Test.label.deprecated \"paired square brackets\" <| Test.expect (isPaired \"[]\" === true)" }, { - "test_code": "matchingBrackets.test.ex2 = let\n\tTest.label \"empty string\" <| Test.expect (isPaired \"\" === true)", - "name": "matchingBrackets.test.ex2" + "name": "empty string", + "test_code": "let\n Test.label.deprecated \"empty string\" <| Test.expect (isPaired \"\" === true)" }, { - "test_code": "matchingBrackets.test.ex3 = let\n\tTest.label \"unpaired brackets\" <| Test.expect (isPaired \"[[\" === false)", - "name": "matchingBrackets.test.ex3" + "name": "unpaired brackets", + "test_code": "let\n Test.label.deprecated \"unpaired brackets\" <| Test.expect (isPaired \"[[\" === false)" }, { - "test_code": "matchingBrackets.test.ex4 = let\n\tTest.label \"wrong ordered brackets\" <| Test.expect (isPaired \"}{\" === false)", - "name": "matchingBrackets.test.ex4" + "name": "wrong ordered brackets", + "test_code": "let\n Test.label.deprecated \"wrong ordered brackets\" <| Test.expect (isPaired \"}{\" === false)" }, { - "test_code": "matchingBrackets.test.ex5 = let\n\tTest.label \"wrong closing bracket\" <| Test.expect (isPaired \"{]\" === false)", - "name": "matchingBrackets.test.ex5" + "name": "wrong closing bracket", + "test_code": "let\n Test.label.deprecated \"wrong closing bracket\" <| Test.expect (isPaired \"{]\" === false)" }, { - "test_code": "matchingBrackets.test.ex6 = let\n\tTest.label \"paired with whitespace\" <| Test.expect (isPaired \"{ }\" === true)", - "name": "matchingBrackets.test.ex6" + "name": "paired with whitespace", + "test_code": "let\n Test.label.deprecated \"paired with whitespace\" <| Test.expect (isPaired \"{ }\" === true)" }, { - "test_code": "matchingBrackets.test.ex7 = let\n\tTest.label \"partially paired brackets\" <| Test.expect (isPaired \"{[])\" === false)", - "name": "matchingBrackets.test.ex7" + "name": "partially paired brackets", + "test_code": "let\n Test.label.deprecated \"partially paired brackets\" <| Test.expect (isPaired \"{[])\" === false)" }, { - "test_code": "matchingBrackets.test.ex8 = let\n\tTest.label \"simple nested brackets\" <| Test.expect (isPaired \"{[]}\" === true)", - "name": "matchingBrackets.test.ex8" + "name": "simple nested brackets", + "test_code": "let\n Test.label.deprecated \"simple nested brackets\" <| Test.expect (isPaired \"{[]}\" === true)" }, { - "test_code": "matchingBrackets.test.ex9 = let\n\tTest.label \"several paired brackets\" <| Test.expect (isPaired \"{}[]\" === true)", - "name": "matchingBrackets.test.ex9" + "name": "several paired brackets", + "test_code": "let\n Test.label.deprecated \"several paired brackets\" <| Test.expect (isPaired \"{}[]\" === true)" }, { - "test_code": "matchingBrackets.test.ex10 = let\n\tTest.label \"paired and nested brackets\" <| Test.expect (isPaired \"([{}({}[])])\" === true)", - "name": "matchingBrackets.test.ex10" + "name": "paired and nested brackets", + "test_code": "let\n Test.label.deprecated \"paired and nested brackets\" <| Test.expect (isPaired \"([{}({}[])])\" === true)" }, { - "test_code": "matchingBrackets.test.ex11 = let\n\tTest.label \"unopened closing brackets\" <| Test.expect (isPaired \"{[)][]}\" === false)", - "name": "matchingBrackets.test.ex11" + "name": "unopened closing brackets", + "test_code": "let\n Test.label.deprecated \"unopened closing brackets\" <| Test.expect (isPaired \"{[)][]}\" === false)" }, { - "test_code": "matchingBrackets.test.ex12 = let\n\tTest.label \"unpaired and nested brackets\" <| Test.expect (isPaired \"([{])\" === false)", - "name": "matchingBrackets.test.ex12" + "name": "unpaired and nested brackets", + "test_code": "let\n Test.label.deprecated \"unpaired and nested brackets\" <| Test.expect (isPaired \"([{])\" === false)" }, { - "test_code": "matchingBrackets.test.ex13 = let\n\tTest.label \"paired and wrong nested brackets\" <| Test.expect (isPaired \"[({]})\" === false)", - "name": "matchingBrackets.test.ex13" + "name": "paired and wrong nested brackets", + "test_code": "let\n Test.label.deprecated \"paired and wrong nested brackets\" <| Test.expect (isPaired \"[({]})\" === false)" }, { - "test_code": "matchingBrackets.test.ex14 = let\n\tTest.label \"paired and incomplete brackets\" <| Test.expect (isPaired \"{}[\" === false)", - "name": "matchingBrackets.test.ex14" + "name": "paired and incomplete brackets", + "test_code": "let\n Test.label.deprecated \"paired and incomplete brackets\" <| Test.expect (isPaired \"{}[\" === false)" }, { - "test_code": "matchingBrackets.test.ex15 = let\n\tTest.label \"too many closing brackets\" <| Test.expect (isPaired \"[]]\" === false)", - "name": "matchingBrackets.test.ex15" + "name": "too many closing brackets", + "test_code": "let\n Test.label.deprecated \"too many closing brackets\" <| Test.expect (isPaired \"[]]\" === false)" }, { - "test_code": "matchingBrackets.test.ex16 = let\n\tTest.label \"early unexpected brackets\" <| Test.expect (isPaired \")()\" === false)", - "name": "matchingBrackets.test.ex16" + "name": "early unexpected brackets", + "test_code": "let\n Test.label.deprecated \"early unexpected brackets\" <| Test.expect (isPaired \")()\" === false)" }, { - "test_code": "matchingBrackets.test.ex17 = let\n\tTest.label \"early mismatched brackets\" <| Test.expect (isPaired \"{)()\" === false)", - "name": "matchingBrackets.test.ex17" + "name": "early mismatched brackets", + "test_code": "let\n Test.label.deprecated \"early mismatched brackets\" <| Test.expect (isPaired \"{)()\" === false)" }, { - "test_code": "matchingBrackets.test.ex18 = let\n\tTest.label \"math expression\" <| Test.expect (isPaired \"(((185 + 223.85) * 15) - 543)/2\" === true)", - "name": "matchingBrackets.test.ex18" + "name": "math expression", + "test_code": "let\n Test.label.deprecated \"math expression\" <| Test.expect (isPaired \"(((185 + 223.85) * 15) - 543)/2\" === true)" }, { - "test_code": "matchingBrackets.test.ex19 = let\n\tTest.label \"complex latex expression\" <| Test.expect (isPaired \"\\\\left(\\\\begin{array}{cc} \\\\frac{1}{3} & x\\\\\\\\ \\\\mathrm{e}^{x} &... x^2 \\\\end{array}\\\\right)\" === true)", - "name": "matchingBrackets.test.ex19" + "name": "complex latex expression", + "test_code": "let\n Test.label.deprecated \"complex latex expression\" <| Test.expect (isPaired \"\\\\left(\\\\begin{array}{cc} \\\\frac{1}{3} & x\\\\\\\\ \\\\mathrm{e}^{x} &... x^2 \\\\end{array}\\\\right)\" === true)" } -] +] \ No newline at end of file diff --git a/exercises/practice/matching-brackets/.meta/testLoader.md b/exercises/practice/matching-brackets/.meta/testLoader.md index ba9b020..049bfa7 100644 --- a/exercises/practice/matching-brackets/.meta/testLoader.md +++ b/exercises/practice/matching-brackets/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for exercise ```ucm -.> load ./matchingBrackets.u -.> add -.> load ./matchingBrackets.test.u -.> add -.> move.term matchingBrackets.tests tests +scratch/main> load ./matchingBrackets.u +scratch/main> add +scratch/main> load ./matchingBrackets.test.u +scratch/main> add +scratch/main> move.term matchingBrackets.tests tests ``` diff --git a/exercises/practice/matching-brackets/matchingBrackets.test.u b/exercises/practice/matching-brackets/matchingBrackets.test.u index 1d83a07..01d77b3 100644 --- a/exercises/practice/matching-brackets/matchingBrackets.test.u +++ b/exercises/practice/matching-brackets/matchingBrackets.test.u @@ -1,59 +1,59 @@ matchingBrackets.test.ex1 = let - Test.label "paired square brackets" <| Test.expect (isPaired "[]" === true) + Test.label.deprecated "paired square brackets" <| Test.expect (isPaired "[]" === true) matchingBrackets.test.ex2 = let - Test.label "empty string" <| Test.expect (isPaired "" === true) + Test.label.deprecated "empty string" <| Test.expect (isPaired "" === true) matchingBrackets.test.ex3 = let - Test.label "unpaired brackets" <| Test.expect (isPaired "[[" === false) + Test.label.deprecated "unpaired brackets" <| Test.expect (isPaired "[[" === false) matchingBrackets.test.ex4 = let - Test.label "wrong ordered brackets" <| Test.expect (isPaired "}{" === false) + Test.label.deprecated "wrong ordered brackets" <| Test.expect (isPaired "}{" === false) matchingBrackets.test.ex5 = let - Test.label "wrong closing bracket" <| Test.expect (isPaired "{]" === false) + Test.label.deprecated "wrong closing bracket" <| Test.expect (isPaired "{]" === false) matchingBrackets.test.ex6 = let - Test.label "paired with whitespace" <| Test.expect (isPaired "{ }" === true) + Test.label.deprecated "paired with whitespace" <| Test.expect (isPaired "{ }" === true) matchingBrackets.test.ex7 = let - Test.label "partially paired brackets" <| Test.expect (isPaired "{[])" === false) + Test.label.deprecated "partially paired brackets" <| Test.expect (isPaired "{[])" === false) matchingBrackets.test.ex8 = let - Test.label "simple nested brackets" <| Test.expect (isPaired "{[]}" === true) + Test.label.deprecated "simple nested brackets" <| Test.expect (isPaired "{[]}" === true) matchingBrackets.test.ex9 = let - Test.label "several paired brackets" <| Test.expect (isPaired "{}[]" === true) + Test.label.deprecated "several paired brackets" <| Test.expect (isPaired "{}[]" === true) matchingBrackets.test.ex10 = let - Test.label "paired and nested brackets" <| Test.expect (isPaired "([{}({}[])])" === true) + Test.label.deprecated "paired and nested brackets" <| Test.expect (isPaired "([{}({}[])])" === true) matchingBrackets.test.ex11 = let - Test.label "unopened closing brackets" <| Test.expect (isPaired "{[)][]}" === false) + Test.label.deprecated "unopened closing brackets" <| Test.expect (isPaired "{[)][]}" === false) matchingBrackets.test.ex12 = let - Test.label "unpaired and nested brackets" <| Test.expect (isPaired "([{])" === false) + Test.label.deprecated "unpaired and nested brackets" <| Test.expect (isPaired "([{])" === false) matchingBrackets.test.ex13 = let - Test.label "paired and wrong nested brackets" <| Test.expect (isPaired "[({]})" === false) + Test.label.deprecated "paired and wrong nested brackets" <| Test.expect (isPaired "[({]})" === false) matchingBrackets.test.ex14 = let - Test.label "paired and incomplete brackets" <| Test.expect (isPaired "{}[" === false) + Test.label.deprecated "paired and incomplete brackets" <| Test.expect (isPaired "{}[" === false) matchingBrackets.test.ex15 = let - Test.label "too many closing brackets" <| Test.expect (isPaired "[]]" === false) + Test.label.deprecated "too many closing brackets" <| Test.expect (isPaired "[]]" === false) matchingBrackets.test.ex16 = let - Test.label "early unexpected brackets" <| Test.expect (isPaired ")()" === false) + Test.label.deprecated "early unexpected brackets" <| Test.expect (isPaired ")()" === false) matchingBrackets.test.ex17 = let - Test.label "early mismatched brackets" <| Test.expect (isPaired "{)()" === false) + Test.label.deprecated "early mismatched brackets" <| Test.expect (isPaired "{)()" === false) matchingBrackets.test.ex18 = let - Test.label "math expression" <| Test.expect (isPaired "(((185 + 223.85) * 15) - 543)/2" === true) + Test.label.deprecated "math expression" <| Test.expect (isPaired "(((185 + 223.85) * 15) - 543)/2" === true) matchingBrackets.test.ex19 = let - Test.label "complex latex expression" <| Test.expect (isPaired "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)" === true) + Test.label.deprecated "complex latex expression" <| Test.expect (isPaired "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)" === true) test> matchingBrackets.tests = runAll [ matchingBrackets.test.ex1, diff --git a/exercises/practice/minesweeper/.meta/examples/minesweeper.example.u b/exercises/practice/minesweeper/.meta/examples/minesweeper.example.u index 5cde03b..12e502d 100644 --- a/exercises/practice/minesweeper/.meta/examples/minesweeper.example.u +++ b/exercises/practice/minesweeper/.meta/examples/minesweeper.example.u @@ -12,7 +12,7 @@ minesweeper.annotate board = minesweeper.directions : [(Int, Int)] minesweeper.directions = - use base.Int range + use Int range range -1 +2 |> map (n -> zip (fill 3 n) (range -1 +2)) |> join @@ -47,7 +47,7 @@ minesweeper.createCoordinatesMap coordinates = minesweeper.findRowMines : Int -> Text -> [(Int, Int)] minesweeper.findRowMines rowNumber row = - use base.Int range + use Int range isMine = at2 >> (==) ?* row |> toCharList @@ -57,7 +57,7 @@ minesweeper.findRowMines rowNumber row = minesweeper.findBoardMines : [Text] -> [(Int, Int)] minesweeper.findBoardMines board = - use base.Int range + use Int range board |> zip (range +0 (size board |> toInt)) |> map (uncurry findRowMines) @@ -65,7 +65,7 @@ minesweeper.findBoardMines board = minesweeper.annotateRow : Int -> Text -> Map (Int, Int) Nat -> Text minesweeper.annotateRow rowNumber row coordinatesMap = - use base.Int range + use Int range populateTile indexedTile = (colNumber, value) = indexedTile match value with @@ -81,7 +81,7 @@ minesweeper.annotateRow rowNumber row coordinatesMap = minesweeper.annotateBoard : [Text] -> Map (Int, Int) Nat -> [Text] minesweeper.annotateBoard board coordinatesMap = - use base.Int range + use Int range board |> zip (range +0 (size board |> toInt)) |> map (p -> (uncurry annotateRow p) coordinatesMap) diff --git a/exercises/practice/minesweeper/.meta/testAnnotation.json b/exercises/practice/minesweeper/.meta/testAnnotation.json index a1ea1c7..9820503 100644 --- a/exercises/practice/minesweeper/.meta/testAnnotation.json +++ b/exercises/practice/minesweeper/.meta/testAnnotation.json @@ -1,50 +1,50 @@ [ { - "name": "minesweeper.annotate.tests.ex1", - "test_code": "expected = []\n input = []\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"no rows\"" + "name": "no rows", + "test_code": "expected = []\n input = []\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"no rows\"" }, { - "name": "minesweeper.annotate.tests.ex2", - "test_code": "expected = [\"\"]\n input = [\"\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"no columns\"" + "name": "no columns", + "test_code": "expected = [\"\"]\n input = [\"\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"no columns\"" }, { - "name": "minesweeper.annotate.tests.ex3", - "test_code": "expected = [\" \", \" \", \" \"]\n input = [\" \", \" \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"no mines\"" + "name": "no mines", + "test_code": "expected = [\" \", \" \", \" \"]\n input = [\" \", \" \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"no mines\"" }, { - "name": "minesweeper.annotate.tests.ex4", - "test_code": "expected = [\"***\", \"***\", \"***\"]\n input = [\"***\", \"***\", \"***\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"minefield with only mines\"" + "name": "minefield with only mines", + "test_code": "expected = [\"***\", \"***\", \"***\"]\n input = [\"***\", \"***\", \"***\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"minefield with only mines\"" }, { - "name": "minesweeper.annotate.tests.ex5", - "test_code": "expected = [\"111\", \"1*1\", \"111\"]\n input = [\" \", \" * \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"mine surrounded by spaces\"" + "name": "mine surrounded by spaces", + "test_code": "expected = [\"111\", \"1*1\", \"111\"]\n input = [\" \", \" * \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"mine surrounded by spaces\"" }, { - "name": "minesweeper.annotate.tests.ex6", - "test_code": "expected = [\"***\", \"*8*\", \"***\"]\n input = [\"***\", \"* *\", \"***\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"space surrounded by mines\"" + "name": "space surrounded by mines", + "test_code": "expected = [\"***\", \"*8*\", \"***\"]\n input = [\"***\", \"* *\", \"***\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"space surrounded by mines\"" }, { - "name": "minesweeper.annotate.tests.ex7", - "test_code": "expected = [\"1*2*1\"]\n input = [\" * * \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"horizontal line\"" + "name": "horizontal line", + "test_code": "expected = [\"1*2*1\"]\n input = [\" * * \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"horizontal line\"" }, { - "name": "minesweeper.annotate.tests.ex8", - "test_code": "expected = [\"*1 1*\"]\n input = [\"* *\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"horizontal line, mines at edges\"" + "name": "horizontal line, mines at edges", + "test_code": "expected = [\"*1 1*\"]\n input = [\"* *\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"horizontal line, mines at edges\"" }, { - "name": "minesweeper.annotate.tests.ex9", - "test_code": "expected = [\"1\", \"*\", \"2\", \"*\", \"1\"]\n input = [\" \", \"*\", \" \", \"*\", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"vertical line\"" + "name": "vertical line", + "test_code": "expected = [\"1\", \"*\", \"2\", \"*\", \"1\"]\n input = [\" \", \"*\", \" \", \"*\", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"vertical line\"" }, { - "name": "minesweeper.annotate.tests.ex10", - "test_code": "expected = [\"*\", \"1\", \" \", \"1\", \"*\"]\n input = [\"*\", \" \", \" \", \" \", \"*\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"vertical line, mines at edges\"" + "name": "vertical line, mines at edges", + "test_code": "expected = [\"*\", \"1\", \" \", \"1\", \"*\"]\n input = [\"*\", \" \", \" \", \" \", \"*\"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"vertical line, mines at edges\"" }, { - "name": "minesweeper.annotate.tests.ex11", - "test_code": "expected = [\" 2*2 \", \"25*52\", \"*****\", \"25*52\", \" 2*2 \"]\n input = [\" * \", \" * \", \"*****\", \" * \", \" * \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"cross\"" + "name": "cross", + "test_code": "expected = [\" 2*2 \", \"25*52\", \"*****\", \"25*52\", \" 2*2 \"]\n input = [\" * \", \" * \", \"*****\", \" * \", \" * \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"cross\"" }, { - "name": "minesweeper.annotate.tests.ex12", - "test_code": "expected = [\"1*22*1\", \"12*322\", \" 123*2\", \"112*4*\", \"1*22*2\", \"111111\"]\n input = [\" * * \", \" * \", \" * \", \" * *\", \" * * \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label \"large minefield\"" + "name": "large minefield", + "test_code": "expected = [\"1*22*1\", \"12*322\", \" 123*2\", \"112*4*\", \"1*22*2\", \"111111\"]\n input = [\" * * \", \" * \", \" * \", \" * *\", \" * * \", \" \"]\n expected === minesweeper.annotate input\n |> expect\n |> Test.label.deprecated \"large minefield\"" } ] \ No newline at end of file diff --git a/exercises/practice/minesweeper/.meta/testLoader.md b/exercises/practice/minesweeper/.meta/testLoader.md index 0894346..540e93d 100644 --- a/exercises/practice/minesweeper/.meta/testLoader.md +++ b/exercises/practice/minesweeper/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for minesweeper exercise ```ucm -.> load ./minesweeper.u -.> add -.> load ./minesweeper.test.u -.> add -.> move.term minesweeper.tests tests +scratch/main> load ./minesweeper.u +scratch/main> add +scratch/main> load ./minesweeper.test.u +scratch/main> add +scratch/main> move.term minesweeper.tests tests ``` diff --git a/exercises/practice/minesweeper/minesweeper.test.u b/exercises/practice/minesweeper/minesweeper.test.u index 358f5fe..db75172 100644 --- a/exercises/practice/minesweeper/minesweeper.test.u +++ b/exercises/practice/minesweeper/minesweeper.test.u @@ -3,84 +3,84 @@ minesweeper.annotate.tests.ex1 = input = [] expected === minesweeper.annotate input |> expect - |> Test.label "no rows" + |> Test.label.deprecated "no rows" minesweeper.annotate.tests.ex2 = expected = [""] input = [""] expected === minesweeper.annotate input |> expect - |> Test.label "no columns" + |> Test.label.deprecated "no columns" minesweeper.annotate.tests.ex3 = expected = [" ", " ", " "] input = [" ", " ", " "] expected === minesweeper.annotate input |> expect - |> Test.label "no mines" + |> Test.label.deprecated "no mines" minesweeper.annotate.tests.ex4 = expected = ["***", "***", "***"] input = ["***", "***", "***"] expected === minesweeper.annotate input |> expect - |> Test.label "minefield with only mines" + |> Test.label.deprecated "minefield with only mines" minesweeper.annotate.tests.ex5 = expected = ["111", "1*1", "111"] input = [" ", " * ", " "] expected === minesweeper.annotate input |> expect - |> Test.label "mine surrounded by spaces" + |> Test.label.deprecated "mine surrounded by spaces" minesweeper.annotate.tests.ex6 = expected = ["***", "*8*", "***"] input = ["***", "* *", "***"] expected === minesweeper.annotate input |> expect - |> Test.label "space surrounded by mines" + |> Test.label.deprecated "space surrounded by mines" minesweeper.annotate.tests.ex7 = expected = ["1*2*1"] input = [" * * "] expected === minesweeper.annotate input |> expect - |> Test.label "horizontal line" + |> Test.label.deprecated "horizontal line" minesweeper.annotate.tests.ex8 = expected = ["*1 1*"] input = ["* *"] expected === minesweeper.annotate input |> expect - |> Test.label "horizontal line, mines at edges" + |> Test.label.deprecated "horizontal line, mines at edges" minesweeper.annotate.tests.ex9 = expected = ["1", "*", "2", "*", "1"] input = [" ", "*", " ", "*", " "] expected === minesweeper.annotate input |> expect - |> Test.label "vertical line" + |> Test.label.deprecated "vertical line" minesweeper.annotate.tests.ex10 = expected = ["*", "1", " ", "1", "*"] input = ["*", " ", " ", " ", "*"] expected === minesweeper.annotate input |> expect - |> Test.label "vertical line, mines at edges" + |> Test.label.deprecated "vertical line, mines at edges" minesweeper.annotate.tests.ex11 = expected = [" 2*2 ", "25*52", "*****", "25*52", " 2*2 "] input = [" * ", " * ", "*****", " * ", " * "] expected === minesweeper.annotate input |> expect - |> Test.label "cross" + |> Test.label.deprecated "cross" minesweeper.annotate.tests.ex12 = expected = ["1*22*1", "12*322", " 123*2", "112*4*", "1*22*2", "111111"] input = [" * * ", " * ", " * ", " * *", " * * ", " "] expected === minesweeper.annotate input |> expect - |> Test.label "large minefield" + |> Test.label.deprecated "large minefield" test> minesweeper.tests = runAll [ minesweeper.annotate.tests.ex1, diff --git a/exercises/practice/nucleotide-count/.meta/testAnnotation.json b/exercises/practice/nucleotide-count/.meta/testAnnotation.json index 9ef0410..c8973e8 100644 --- a/exercises/practice/nucleotide-count/.meta/testAnnotation.json +++ b/exercises/practice/nucleotide-count/.meta/testAnnotation.json @@ -1,22 +1,22 @@ [ { - "test_code": "nucleotideCount.test.ex1 = let\n\tTest.label \"empty strand\" <| Test.expect (nucleotideCounts \"\" === (Some [(\"A\",0),(\"C\",0),(\"G\",0),(\"T\",0)]))", - "name": "nucleotideCount.test.ex1" + "name": "empty strand", + "test_code": "let\n Test.label.deprecated \"empty strand\" <| Test.expect (toSortedList (nucleotideCounts \"\") === (Some [(\"A\",0),(\"C\",0),(\"G\",0),(\"T\",0)]))" }, { - "test_code": "nucleotideCount.test.ex2 = let\n\tTest.label \"can count one nucleotide in single-character input\" <| Test.expect (nucleotideCounts \"G\" === (Some [(\"A\",0),(\"C\",0),(\"G\",1),(\"T\",0)]))", - "name": "nucleotideCount.test.ex2" + "name": "can count one nucleotide in single-character input", + "test_code": "let\n Test.label.deprecated \"can count one nucleotide in single-character input\" <| Test.expect (toSortedList (nucleotideCounts \"G\") === (Some [(\"A\",0),(\"C\",0),(\"G\",1),(\"T\",0)]))" }, { - "test_code": "nucleotideCount.test.ex3 = let\n\tTest.label \"strand with repeated nucleotide\" <| Test.expect (nucleotideCounts \"GGGGGGG\" === (Some [(\"A\",0),(\"C\",0),(\"G\",7),(\"T\",0)]))", - "name": "nucleotideCount.test.ex3" + "name": "strand with repeated nucleotide", + "test_code": "let\n Test.label.deprecated \"strand with repeated nucleotide\" <| Test.expect (toSortedList (nucleotideCounts \"GGGGGGG\") === (Some [(\"A\",0),(\"C\",0),(\"G\",7),(\"T\",0)]))" }, { - "test_code": "nucleotideCount.test.ex4 = let\n\tTest.label \"strand with multiple nucleotides\" <| Test.expect (nucleotideCounts \"AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC\" === (Some [(\"A\",20),(\"C\",12),(\"G\",17),(\"T\",21)]))", - "name": "nucleotideCount.test.ex4" + "name": "strand with multiple nucleotides", + "test_code": "let\n Test.label.deprecated \"strand with multiple nucleotides\" <| Test.expect (toSortedList (nucleotideCounts \"AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC\") === (Some [(\"A\",20),(\"C\",12),(\"G\",17),(\"T\",21)]))" }, { - "test_code": "nucleotideCount.test.ex5 = let\n\tTest.label \"strand with invalid nucleotides\" <| Test.expect (nucleotideCounts \"AGXXACT\" === None)", - "name": "nucleotideCount.test.ex5" + "name": "strand with invalid nucleotides", + "test_code": "let\n Test.label.deprecated \"strand with invalid nucleotides\" <| Test.expect (toSortedList (nucleotideCounts \"AGXXACT\") === None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/nucleotide-count/.meta/testLoader.md b/exercises/practice/nucleotide-count/.meta/testLoader.md index a8bafc4..0bfd5d7 100644 --- a/exercises/practice/nucleotide-count/.meta/testLoader.md +++ b/exercises/practice/nucleotide-count/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for exercise ```ucm -.> load ./nucleotideCount.u -.> add -.> load ./nucleotideCount.test.u -.> add -.> move.term nucleotideCount.tests tests +scratch/main> load ./nucleotideCount.u +scratch/main> add +scratch/main> load ./nucleotideCount.test.u +scratch/main> add +scratch/main> move.term nucleotideCount.tests tests ``` diff --git a/exercises/practice/nucleotide-count/nucleotideCount.test.u b/exercises/practice/nucleotide-count/nucleotideCount.test.u index 9022c62..5e00b1a 100644 --- a/exercises/practice/nucleotide-count/nucleotideCount.test.u +++ b/exercises/practice/nucleotide-count/nucleotideCount.test.u @@ -4,19 +4,19 @@ nucleotideCount.toSortedList input = Optional.map go input nucleotideCount.test.ex1 = let - Test.label "empty strand" <| Test.expect (toSortedList (nucleotideCounts "") === (Some [("A",0),("C",0),("G",0),("T",0)])) + Test.label.deprecated "empty strand" <| Test.expect (toSortedList (nucleotideCounts "") === (Some [("A",0),("C",0),("G",0),("T",0)])) nucleotideCount.test.ex2 = let - Test.label "can count one nucleotide in single-character input" <| Test.expect (toSortedList (nucleotideCounts "G") === (Some [("A",0),("C",0),("G",1),("T",0)])) + Test.label.deprecated "can count one nucleotide in single-character input" <| Test.expect (toSortedList (nucleotideCounts "G") === (Some [("A",0),("C",0),("G",1),("T",0)])) nucleotideCount.test.ex3 = let - Test.label "strand with repeated nucleotide" <| Test.expect (toSortedList (nucleotideCounts "GGGGGGG") === (Some [("A",0),("C",0),("G",7),("T",0)])) + Test.label.deprecated "strand with repeated nucleotide" <| Test.expect (toSortedList (nucleotideCounts "GGGGGGG") === (Some [("A",0),("C",0),("G",7),("T",0)])) nucleotideCount.test.ex4 = let - Test.label "strand with multiple nucleotides" <| Test.expect (toSortedList (nucleotideCounts "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") === (Some [("A",20),("C",12),("G",17),("T",21)])) + Test.label.deprecated "strand with multiple nucleotides" <| Test.expect (toSortedList (nucleotideCounts "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") === (Some [("A",20),("C",12),("G",17),("T",21)])) nucleotideCount.test.ex5 = let - Test.label "strand with invalid nucleotides" <| Test.expect (toSortedList (nucleotideCounts "AGXXACT") === None) + Test.label.deprecated "strand with invalid nucleotides" <| Test.expect (toSortedList (nucleotideCounts "AGXXACT") === None) test> nucleotideCount.tests = runAll [ nucleotideCount.test.ex1, diff --git a/exercises/practice/pangram/.meta/testAnnotation.json b/exercises/practice/pangram/.meta/testAnnotation.json index e2da944..a82b9c6 100644 --- a/exercises/practice/pangram/.meta/testAnnotation.json +++ b/exercises/practice/pangram/.meta/testAnnotation.json @@ -1,42 +1,42 @@ [ { - "name": "pangram.isPangram.tests.ex1", - "test_code": "expect (false == isPangram \"\")\n |> Test.label \"empty sentence\"" + "name": "empty sentence", + "test_code": "expect (false == isPangram \"\")\n |> Test.label.deprecated \"empty sentence\"" }, { - "name": "pangram.isPangram.tests.ex2", - "test_code": "expect (true == isPangram \"abcdefghijklmnopqrstuvwxyz\")\n |> Test.label \"perfect lower case\"" + "name": "perfect lower case", + "test_code": "expect (true == isPangram \"abcdefghijklmnopqrstuvwxyz\")\n |> Test.label.deprecated \"perfect lower case\"" }, { - "name": "pangram.isPangram.tests.ex3", - "test_code": "expect (true == isPangram \"the quick brown fox jumps over the lazy dog\")\n |> Test.label \"only lower case\"" + "name": "only lower case", + "test_code": "expect (true == isPangram \"the quick brown fox jumps over the lazy dog\")\n |> Test.label.deprecated \"only lower case\"" }, { - "name": "pangram.isPangram.tests.ex4", - "test_code": "expect (false == isPangram \"a quick movement of the enemy will jeopardize five gunboats\")\n |> Test.label \"missing the letter 'x'\"" + "name": "missing the letter 'x'", + "test_code": "expect (false == isPangram \"a quick movement of the enemy will jeopardize five gunboats\")\n |> Test.label.deprecated \"missing the letter 'x'\"" }, { - "name": "pangram.isPangram.tests.ex5", - "test_code": "expect (false == isPangram \"five boxing wizards jump quickly at it\")\n |> Test.label \"missing the letter 'h'\"" + "name": "missing the letter 'h'", + "test_code": "expect (false == isPangram \"five boxing wizards jump quickly at it\")\n |> Test.label.deprecated \"missing the letter 'h'\"" }, { - "name": "pangram.isPangram.tests.ex6", - "test_code": "expect (true == isPangram \"the_quick_brown_fox_jumps_over_the_lazy_dog\")\n |> Test.label \"with underscores\"" + "name": "with underscores", + "test_code": "expect (true == isPangram \"the_quick_brown_fox_jumps_over_the_lazy_dog\")\n |> Test.label.deprecated \"with underscores\"" }, { - "name": "pangram.isPangram.tests.ex7", - "test_code": "expect (true == isPangram \"the 1 quick brown fox jumps over the 2 lazy dogs\")\n |> Test.label \"with numbers\"" + "name": "with numbers", + "test_code": "expect (true == isPangram \"the 1 quick brown fox jumps over the 2 lazy dogs\")\n |> Test.label.deprecated \"with numbers\"" }, { - "name": "pangram.isPangram.tests.ex8", - "test_code": "expect (false == isPangram \"7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog\")\n |> Test.label \"missing letters replaced by numbers\"" + "name": "missing letters replaced by numbers", + "test_code": "expect (false == isPangram \"7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog\")\n |> Test.label.deprecated \"missing letters replaced by numbers\"" }, { - "name": "pangram.isPangram.tests.ex9", - "test_code": "expect (true == isPangram \"\"Five quacking Zephyrs jolt my wax bed.\"\")\n |> Test.label \"mixed case and punctuation\"" + "name": "mixed case and punctuation", + "test_code": "expect (true == isPangram \"\\\"Five quacking Zephyrs jolt my wax bed.\\\"\")\n |> Test.label.deprecated \"mixed case and punctuation\"" }, { - "name": "pangram.isPangram.tests.ex10", - "test_code": "expect (false == isPangram \"abcdefghijklm ABCDEFGHIJKLM\")\n |> Test.label \"a-m and A-M are 26 different characters but not a pangram\"" + "name": "a-m and A-M are 26 different characters but not a pangram", + "test_code": "expect (false == isPangram \"abcdefghijklm ABCDEFGHIJKLM\")\n |> Test.label.deprecated \"a-m and A-M are 26 different characters but not a pangram\"" } ] \ No newline at end of file diff --git a/exercises/practice/pangram/.meta/testLoader.md b/exercises/practice/pangram/.meta/testLoader.md index 2e5e006..4ef8fa1 100644 --- a/exercises/practice/pangram/.meta/testLoader.md +++ b/exercises/practice/pangram/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for pangram exercise ```ucm -.> load ./pangram.u -.> add -.> load ./pangram.test.u -.> add -.> move.term pangram.tests tests +scratch/main> load ./pangram.u +scratch/main> add +scratch/main> load ./pangram.test.u +scratch/main> add +scratch/main> move.term pangram.tests tests ``` diff --git a/exercises/practice/pangram/pangram.test.u b/exercises/practice/pangram/pangram.test.u index 2b20ebd..d0d8eab 100644 --- a/exercises/practice/pangram/pangram.test.u +++ b/exercises/practice/pangram/pangram.test.u @@ -1,42 +1,42 @@ pangram.isPangram.tests.ex1 = expect (false == isPangram "") - |> Test.label "empty sentence" + |> Test.label.deprecated "empty sentence" pangram.isPangram.tests.ex2 = expect (true == isPangram "abcdefghijklmnopqrstuvwxyz") - |> Test.label "perfect lower case" + |> Test.label.deprecated "perfect lower case" pangram.isPangram.tests.ex3 = expect (true == isPangram "the quick brown fox jumps over the lazy dog") - |> Test.label "only lower case" + |> Test.label.deprecated "only lower case" pangram.isPangram.tests.ex4 = expect (false == isPangram "a quick movement of the enemy will jeopardize five gunboats") - |> Test.label "missing the letter 'x'" + |> Test.label.deprecated "missing the letter 'x'" pangram.isPangram.tests.ex5 = expect (false == isPangram "five boxing wizards jump quickly at it") - |> Test.label "missing the letter 'h'" + |> Test.label.deprecated "missing the letter 'h'" pangram.isPangram.tests.ex6 = expect (true == isPangram "the_quick_brown_fox_jumps_over_the_lazy_dog") - |> Test.label "with underscores" + |> Test.label.deprecated "with underscores" pangram.isPangram.tests.ex7 = expect (true == isPangram "the 1 quick brown fox jumps over the 2 lazy dogs") - |> Test.label "with numbers" + |> Test.label.deprecated "with numbers" pangram.isPangram.tests.ex8 = expect (false == isPangram "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog") - |> Test.label "missing letters replaced by numbers" + |> Test.label.deprecated "missing letters replaced by numbers" pangram.isPangram.tests.ex9 = expect (true == isPangram "\"Five quacking Zephyrs jolt my wax bed.\"") - |> Test.label "mixed case and punctuation" + |> Test.label.deprecated "mixed case and punctuation" pangram.isPangram.tests.ex10 = expect (false == isPangram "abcdefghijklm ABCDEFGHIJKLM") - |> Test.label "a-m and A-M are 26 different characters but not a pangram" + |> Test.label.deprecated "a-m and A-M are 26 different characters but not a pangram" test> pangram.tests = runAll [ pangram.isPangram.tests.ex1, diff --git a/exercises/practice/pig-latin/.meta/testAnnotation.json b/exercises/practice/pig-latin/.meta/testAnnotation.json index 136070d..a8904bc 100644 --- a/exercises/practice/pig-latin/.meta/testAnnotation.json +++ b/exercises/practice/pig-latin/.meta/testAnnotation.json @@ -1,90 +1,90 @@ [ { - "name": "pigLatin.translate.tests.ex1", - "test_code": "expect (\"appleay\" == pigLatin.translate \"apple\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with a\"" + "name": "ay is added to words that start with vowels - word beginning with a", + "test_code": "expect (\"appleay\" == pigLatin.translate \"apple\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with a\"" }, { - "name": "pigLatin.translate.tests.ex2", - "test_code": "expect (\"earay\" == pigLatin.translate \"ear\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with e\"" + "name": "ay is added to words that start with vowels - word beginning with e", + "test_code": "expect (\"earay\" == pigLatin.translate \"ear\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with e\"" }, { - "name": "pigLatin.translate.tests.ex3", - "test_code": "expect (\"iglooay\" == pigLatin.translate \"igloo\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with i\"" + "name": "ay is added to words that start with vowels - word beginning with i", + "test_code": "expect (\"iglooay\" == pigLatin.translate \"igloo\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with i\"" }, { - "name": "pigLatin.translate.tests.ex4", - "test_code": "expect (\"objectay\" == pigLatin.translate \"object\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with o\"" + "name": "ay is added to words that start with vowels - word beginning with o", + "test_code": "expect (\"objectay\" == pigLatin.translate \"object\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with o\"" }, { - "name": "pigLatin.translate.tests.ex5", - "test_code": "expect (\"underay\" == pigLatin.translate \"under\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with u\"" + "name": "ay is added to words that start with vowels - word beginning with u", + "test_code": "expect (\"underay\" == pigLatin.translate \"under\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with u\"" }, { - "name": "pigLatin.translate.tests.ex6", - "test_code": "expect (\"equalay\" == pigLatin.translate \"equal\")\n |> Test.label \"ay is added to words that start with vowels - word beginning with a vowel and followed by a qu\"" + "name": "ay is added to words that start with vowels - word beginning with a vowel and followed by a qu", + "test_code": "expect (\"equalay\" == pigLatin.translate \"equal\")\n |> Test.label.deprecated \"ay is added to words that start with vowels - word beginning with a vowel and followed by a qu\"" }, { - "name": "pigLatin.translate.tests.ex7", - "test_code": "expect (\"igpay\" == pigLatin.translate \"pig\")\n |> Test.label \"first letter and ay are moved to the end of words that start with consonants - word beginning with p\"" + "name": "first letter and ay are moved to the end of words that start with consonants - word beginning with p", + "test_code": "expect (\"igpay\" == pigLatin.translate \"pig\")\n |> Test.label.deprecated \"first letter and ay are moved to the end of words that start with consonants - word beginning with p\"" }, { - "name": "pigLatin.translate.tests.ex8", - "test_code": "expect (\"oalakay\" == pigLatin.translate \"koala\")\n |> Test.label \"first letter and ay are moved to the end of words that start with consonants - word beginning with k\"" + "name": "first letter and ay are moved to the end of words that start with consonants - word beginning with k", + "test_code": "expect (\"oalakay\" == pigLatin.translate \"koala\")\n |> Test.label.deprecated \"first letter and ay are moved to the end of words that start with consonants - word beginning with k\"" }, { - "name": "pigLatin.translate.tests.ex9", - "test_code": "expect (\"enonxay\" == pigLatin.translate \"xenon\")\n |> Test.label \"first letter and ay are moved to the end of words that start with consonants - word beginning with x\"" + "name": "first letter and ay are moved to the end of words that start with consonants - word beginning with x", + "test_code": "expect (\"enonxay\" == pigLatin.translate \"xenon\")\n |> Test.label.deprecated \"first letter and ay are moved to the end of words that start with consonants - word beginning with x\"" }, { - "name": "pigLatin.translate.tests.ex10", - "test_code": "expect (\"atqay\" == pigLatin.translate \"qat\")\n |> Test.label \"first letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u\"" + "name": "first letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u", + "test_code": "expect (\"atqay\" == pigLatin.translate \"qat\")\n |> Test.label.deprecated \"first letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u\"" }, { - "name": "pigLatin.translate.tests.ex11", - "test_code": "expect (\"airchay\" == pigLatin.translate \"chair\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with ch\"" + "name": "some letter clusters are treated like a single consonant - word beginning with ch", + "test_code": "expect (\"airchay\" == pigLatin.translate \"chair\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with ch\"" }, { - "name": "pigLatin.translate.tests.ex12", - "test_code": "expect (\"eenquay\" == pigLatin.translate \"queen\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with qu\"" + "name": "some letter clusters are treated like a single consonant - word beginning with qu", + "test_code": "expect (\"eenquay\" == pigLatin.translate \"queen\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with qu\"" }, { - "name": "pigLatin.translate.tests.ex13", - "test_code": "expect (\"aresquay\" == pigLatin.translate \"square\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant\"" + "name": "some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant", + "test_code": "expect (\"aresquay\" == pigLatin.translate \"square\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant\"" }, { - "name": "pigLatin.translate.tests.ex14", - "test_code": "expect (\"erapythay\" == pigLatin.translate \"therapy\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with th\"" + "name": "some letter clusters are treated like a single consonant - word beginning with th", + "test_code": "expect (\"erapythay\" == pigLatin.translate \"therapy\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with th\"" }, { - "name": "pigLatin.translate.tests.ex15", - "test_code": "expect (\"ushthray\" == pigLatin.translate \"thrush\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with thr\"" + "name": "some letter clusters are treated like a single consonant - word beginning with thr", + "test_code": "expect (\"ushthray\" == pigLatin.translate \"thrush\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with thr\"" }, { - "name": "pigLatin.translate.tests.ex16", - "test_code": "expect (\"oolschay\" == pigLatin.translate \"school\")\n |> Test.label \"some letter clusters are treated like a single consonant - word beginning with sch\"" + "name": "some letter clusters are treated like a single consonant - word beginning with sch", + "test_code": "expect (\"oolschay\" == pigLatin.translate \"school\")\n |> Test.label.deprecated \"some letter clusters are treated like a single consonant - word beginning with sch\"" }, { - "name": "pigLatin.translate.tests.ex17", - "test_code": "expect (\"yttriaay\" == pigLatin.translate \"yttria\")\n |> Test.label \"some letter clusters are treated like a single vowel - word beginning with yt\"" + "name": "some letter clusters are treated like a single vowel - word beginning with yt", + "test_code": "expect (\"yttriaay\" == pigLatin.translate \"yttria\")\n |> Test.label.deprecated \"some letter clusters are treated like a single vowel - word beginning with yt\"" }, { - "name": "pigLatin.translate.tests.ex18", - "test_code": "expect (\"xrayay\" == pigLatin.translate \"xray\")\n |> Test.label \"some letter clusters are treated like a single vowel - word beginning with xr\"" + "name": "some letter clusters are treated like a single vowel - word beginning with xr", + "test_code": "expect (\"xrayay\" == pigLatin.translate \"xray\")\n |> Test.label.deprecated \"some letter clusters are treated like a single vowel - word beginning with xr\"" }, { - "name": "pigLatin.translate.tests.ex19", - "test_code": "expect (\"ellowyay\" == pigLatin.translate \"yellow\")\n |> Test.label \"position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word\"" + "name": "position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word", + "test_code": "expect (\"ellowyay\" == pigLatin.translate \"yellow\")\n |> Test.label.deprecated \"position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word\"" }, { - "name": "pigLatin.translate.tests.ex20", - "test_code": "expect (\"ythmrhay\" == pigLatin.translate \"rhythm\")\n |> Test.label \"position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster\"" + "name": "position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster", + "test_code": "expect (\"ythmrhay\" == pigLatin.translate \"rhythm\")\n |> Test.label.deprecated \"position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster\"" }, { - "name": "pigLatin.translate.tests.ex21", - "test_code": "expect (\"ymay\" == pigLatin.translate \"my\")\n |> Test.label \"position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word\"" + "name": "position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word", + "test_code": "expect (\"ymay\" == pigLatin.translate \"my\")\n |> Test.label.deprecated \"position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word\"" }, { - "name": "pigLatin.translate.tests.ex22", - "test_code": "expect (\"ickquay astfay unray\" == pigLatin.translate \"quick fast run\")\n |> Test.label \"phrases are translated - a whole phrase\"" + "name": "phrases are translated - a whole phrase", + "test_code": "expect (\"ickquay astfay unray\" == pigLatin.translate \"quick fast run\")\n |> Test.label.deprecated \"phrases are translated - a whole phrase\"" } ] \ No newline at end of file diff --git a/exercises/practice/pig-latin/.meta/testLoader.md b/exercises/practice/pig-latin/.meta/testLoader.md index e60a212..9f67fc0 100644 --- a/exercises/practice/pig-latin/.meta/testLoader.md +++ b/exercises/practice/pig-latin/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for pig-latin exercise ```ucm -.> load ./pigLatin.u -.> add -.> load ./pigLatin.test.u -.> add -.> move.term pigLatin.tests tests +scratch/main> load ./pigLatin.u +scratch/main> add +scratch/main> load ./pigLatin.test.u +scratch/main> add +scratch/main> move.term pigLatin.tests tests ``` diff --git a/exercises/practice/pig-latin/pigLatin.test.u b/exercises/practice/pig-latin/pigLatin.test.u index 9693b46..10b8924 100644 --- a/exercises/practice/pig-latin/pigLatin.test.u +++ b/exercises/practice/pig-latin/pigLatin.test.u @@ -1,90 +1,90 @@ pigLatin.translate.tests.ex1 = expect ("appleay" == pigLatin.translate "apple") - |> Test.label "ay is added to words that start with vowels - word beginning with a" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with a" pigLatin.translate.tests.ex2 = expect ("earay" == pigLatin.translate "ear") - |> Test.label "ay is added to words that start with vowels - word beginning with e" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with e" pigLatin.translate.tests.ex3 = expect ("iglooay" == pigLatin.translate "igloo") - |> Test.label "ay is added to words that start with vowels - word beginning with i" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with i" pigLatin.translate.tests.ex4 = expect ("objectay" == pigLatin.translate "object") - |> Test.label "ay is added to words that start with vowels - word beginning with o" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with o" pigLatin.translate.tests.ex5 = expect ("underay" == pigLatin.translate "under") - |> Test.label "ay is added to words that start with vowels - word beginning with u" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with u" pigLatin.translate.tests.ex6 = expect ("equalay" == pigLatin.translate "equal") - |> Test.label "ay is added to words that start with vowels - word beginning with a vowel and followed by a qu" + |> Test.label.deprecated "ay is added to words that start with vowels - word beginning with a vowel and followed by a qu" pigLatin.translate.tests.ex7 = expect ("igpay" == pigLatin.translate "pig") - |> Test.label "first letter and ay are moved to the end of words that start with consonants - word beginning with p" + |> Test.label.deprecated "first letter and ay are moved to the end of words that start with consonants - word beginning with p" pigLatin.translate.tests.ex8 = expect ("oalakay" == pigLatin.translate "koala") - |> Test.label "first letter and ay are moved to the end of words that start with consonants - word beginning with k" + |> Test.label.deprecated "first letter and ay are moved to the end of words that start with consonants - word beginning with k" pigLatin.translate.tests.ex9 = expect ("enonxay" == pigLatin.translate "xenon") - |> Test.label "first letter and ay are moved to the end of words that start with consonants - word beginning with x" + |> Test.label.deprecated "first letter and ay are moved to the end of words that start with consonants - word beginning with x" pigLatin.translate.tests.ex10 = expect ("atqay" == pigLatin.translate "qat") - |> Test.label "first letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u" + |> Test.label.deprecated "first letter and ay are moved to the end of words that start with consonants - word beginning with q without a following u" pigLatin.translate.tests.ex11 = expect ("airchay" == pigLatin.translate "chair") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with ch" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with ch" pigLatin.translate.tests.ex12 = expect ("eenquay" == pigLatin.translate "queen") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with qu" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with qu" pigLatin.translate.tests.ex13 = expect ("aresquay" == pigLatin.translate "square") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with qu and a preceding consonant" pigLatin.translate.tests.ex14 = expect ("erapythay" == pigLatin.translate "therapy") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with th" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with th" pigLatin.translate.tests.ex15 = expect ("ushthray" == pigLatin.translate "thrush") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with thr" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with thr" pigLatin.translate.tests.ex16 = expect ("oolschay" == pigLatin.translate "school") - |> Test.label "some letter clusters are treated like a single consonant - word beginning with sch" + |> Test.label.deprecated "some letter clusters are treated like a single consonant - word beginning with sch" pigLatin.translate.tests.ex17 = expect ("yttriaay" == pigLatin.translate "yttria") - |> Test.label "some letter clusters are treated like a single vowel - word beginning with yt" + |> Test.label.deprecated "some letter clusters are treated like a single vowel - word beginning with yt" pigLatin.translate.tests.ex18 = expect ("xrayay" == pigLatin.translate "xray") - |> Test.label "some letter clusters are treated like a single vowel - word beginning with xr" + |> Test.label.deprecated "some letter clusters are treated like a single vowel - word beginning with xr" pigLatin.translate.tests.ex19 = expect ("ellowyay" == pigLatin.translate "yellow") - |> Test.label "position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word" + |> Test.label.deprecated "position of y in a word determines if it is a consonant or a vowel - y is treated like a consonant at the beginning of a word" pigLatin.translate.tests.ex20 = expect ("ythmrhay" == pigLatin.translate "rhythm") - |> Test.label "position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster" + |> Test.label.deprecated "position of y in a word determines if it is a consonant or a vowel - y is treated like a vowel at the end of a consonant cluster" pigLatin.translate.tests.ex21 = expect ("ymay" == pigLatin.translate "my") - |> Test.label "position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word" + |> Test.label.deprecated "position of y in a word determines if it is a consonant or a vowel - y as second letter in two letter word" pigLatin.translate.tests.ex22 = expect ("ickquay astfay unray" == pigLatin.translate "quick fast run") - |> Test.label "phrases are translated - a whole phrase" + |> Test.label.deprecated "phrases are translated - a whole phrase" test> pigLatin.tests = runAll [ pigLatin.translate.tests.ex1, diff --git a/exercises/practice/protein-translation/.meta/testAnnotation.json b/exercises/practice/protein-translation/.meta/testAnnotation.json index 0a9073d..b09439c 100644 --- a/exercises/practice/protein-translation/.meta/testAnnotation.json +++ b/exercises/practice/protein-translation/.meta/testAnnotation.json @@ -1,106 +1,106 @@ [ { - "test_code": "proteinTranslation.test.ex1 = let\n Test.label \"Empty RNA sequence results in no proteins\" <| Test.expect (proteins \"\" === [])", - "name": "proteinTranslation.test.ex1" + "name": "Empty RNA sequence results in no proteins", + "test_code": "let\n Test.label.deprecated \"Empty RNA sequence results in no proteins\" <| Test.expect (proteins \"\" === [])" }, { - "test_code": "proteinTranslation.test.ex2 = let\n Test.label \"Methionine RNA sequence\" <| Test.expect (proteins \"AUG\" === [\"Methionine\"])", - "name": "proteinTranslation.test.ex2" + "name": "Methionine RNA sequence", + "test_code": "let\n Test.label.deprecated \"Methionine RNA sequence\" <| Test.expect (proteins \"AUG\" === [\"Methionine\"])" }, { - "test_code": "proteinTranslation.test.ex3 = let\n Test.label \"Phenylalanine RNA sequence 1\" <| Test.expect (proteins \"UUU\" === [\"Phenylalanine\"])", - "name": "proteinTranslation.test.ex3" + "name": "Phenylalanine RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"Phenylalanine RNA sequence 1\" <| Test.expect (proteins \"UUU\" === [\"Phenylalanine\"])" }, { - "test_code": "proteinTranslation.test.ex4 = let\n Test.label \"Phenylalanine RNA sequence 2\" <| Test.expect (proteins \"UUC\" === [\"Phenylalanine\"])", - "name": "proteinTranslation.test.ex4" + "name": "Phenylalanine RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"Phenylalanine RNA sequence 2\" <| Test.expect (proteins \"UUC\" === [\"Phenylalanine\"])" }, { - "test_code": "proteinTranslation.test.ex5 = let\n Test.label \"Leucine RNA sequence 1\" <| Test.expect (proteins \"UUA\" === [\"Leucine\"])", - "name": "proteinTranslation.test.ex5" + "name": "Leucine RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"Leucine RNA sequence 1\" <| Test.expect (proteins \"UUA\" === [\"Leucine\"])" }, { - "test_code": "proteinTranslation.test.ex6 = let\n Test.label \"Leucine RNA sequence 2\" <| Test.expect (proteins \"UUG\" === [\"Leucine\"])", - "name": "proteinTranslation.test.ex6" + "name": "Leucine RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"Leucine RNA sequence 2\" <| Test.expect (proteins \"UUG\" === [\"Leucine\"])" }, { - "test_code": "proteinTranslation.test.ex7 = let\n Test.label \"Serine RNA sequence 1\" <| Test.expect (proteins \"UCU\" === [\"Serine\"])", - "name": "proteinTranslation.test.ex7" + "name": "Serine RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"Serine RNA sequence 1\" <| Test.expect (proteins \"UCU\" === [\"Serine\"])" }, { - "test_code": "proteinTranslation.test.ex8 = let\n Test.label \"Serine RNA sequence 2\" <| Test.expect (proteins \"UCC\" === [\"Serine\"])", - "name": "proteinTranslation.test.ex8" + "name": "Serine RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"Serine RNA sequence 2\" <| Test.expect (proteins \"UCC\" === [\"Serine\"])" }, { - "test_code": "proteinTranslation.test.ex9 = let\n Test.label \"Serine RNA sequence 3\" <| Test.expect (proteins \"UCA\" === [\"Serine\"])", - "name": "proteinTranslation.test.ex9" + "name": "Serine RNA sequence 3", + "test_code": "let\n Test.label.deprecated \"Serine RNA sequence 3\" <| Test.expect (proteins \"UCA\" === [\"Serine\"])" }, { - "test_code": "proteinTranslation.test.ex10 = let\n Test.label \"Serine RNA sequence 4\" <| Test.expect (proteins \"UCG\" === [\"Serine\"])", - "name": "proteinTranslation.test.ex10" + "name": "Serine RNA sequence 4", + "test_code": "let\n Test.label.deprecated \"Serine RNA sequence 4\" <| Test.expect (proteins \"UCG\" === [\"Serine\"])" }, { - "test_code": "proteinTranslation.test.ex11 = let\n Test.label \"Tyrosine RNA sequence 1\" <| Test.expect (proteins \"UAU\" === [\"Tyrosine\"])", - "name": "proteinTranslation.test.ex11" + "name": "Tyrosine RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"Tyrosine RNA sequence 1\" <| Test.expect (proteins \"UAU\" === [\"Tyrosine\"])" }, { - "test_code": "proteinTranslation.test.ex12 = let\n Test.label \"Tyrosine RNA sequence 2\" <| Test.expect (proteins \"UAC\" === [\"Tyrosine\"])", - "name": "proteinTranslation.test.ex12" + "name": "Tyrosine RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"Tyrosine RNA sequence 2\" <| Test.expect (proteins \"UAC\" === [\"Tyrosine\"])" }, { - "test_code": "proteinTranslation.test.ex13 = let\n Test.label \"Cysteine RNA sequence 1\" <| Test.expect (proteins \"UGU\" === [\"Cysteine\"])", - "name": "proteinTranslation.test.ex13" + "name": "Cysteine RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"Cysteine RNA sequence 1\" <| Test.expect (proteins \"UGU\" === [\"Cysteine\"])" }, { - "test_code": "proteinTranslation.test.ex14 = let\n Test.label \"Cysteine RNA sequence 2\" <| Test.expect (proteins \"UGC\" === [\"Cysteine\"])", - "name": "proteinTranslation.test.ex14" + "name": "Cysteine RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"Cysteine RNA sequence 2\" <| Test.expect (proteins \"UGC\" === [\"Cysteine\"])" }, { - "test_code": "proteinTranslation.test.ex15 = let\n Test.label \"Tryptophan RNA sequence\" <| Test.expect (proteins \"UGG\" === [\"Tryptophan\"])", - "name": "proteinTranslation.test.ex15" + "name": "Tryptophan RNA sequence", + "test_code": "let\n Test.label.deprecated \"Tryptophan RNA sequence\" <| Test.expect (proteins \"UGG\" === [\"Tryptophan\"])" }, { - "test_code": "proteinTranslation.test.ex16 = let\n Test.label \"STOP codon RNA sequence 1\" <| Test.expect (proteins \"UAA\" === [])", - "name": "proteinTranslation.test.ex16" + "name": "STOP codon RNA sequence 1", + "test_code": "let\n Test.label.deprecated \"STOP codon RNA sequence 1\" <| Test.expect (proteins \"UAA\" === [])" }, { - "test_code": "proteinTranslation.test.ex17 = let\n Test.label \"STOP codon RNA sequence 2\" <| Test.expect (proteins \"UAG\" === [])", - "name": "proteinTranslation.test.ex17" + "name": "STOP codon RNA sequence 2", + "test_code": "let\n Test.label.deprecated \"STOP codon RNA sequence 2\" <| Test.expect (proteins \"UAG\" === [])" }, { - "test_code": "proteinTranslation.test.ex18 = let\n Test.label \"STOP codon RNA sequence 3\" <| Test.expect (proteins \"UGA\" === [])", - "name": "proteinTranslation.test.ex18" + "name": "STOP codon RNA sequence 3", + "test_code": "let\n Test.label.deprecated \"STOP codon RNA sequence 3\" <| Test.expect (proteins \"UGA\" === [])" }, { - "test_code": "proteinTranslation.test.ex19 = let\n Test.label \"Sequence of two protein codons translates into proteins\" <| Test.expect (proteins \"UUUUUU\" === [\"Phenylalanine\", \"Phenylalanine\"])", - "name": "proteinTranslation.test.ex19" + "name": "Sequence of two protein codons translates into proteins", + "test_code": "let\n Test.label.deprecated \"Sequence of two protein codons translates into proteins\" <| Test.expect (proteins \"UUUUUU\" === [\"Phenylalanine\", \"Phenylalanine\"])" }, { - "test_code": "proteinTranslation.test.ex20 = let\n Test.label \"Sequence of two different protein codons translates into proteins\" <| Test.expect (proteins \"UUAUUG\" === [\"Leucine\", \"Leucine\"])", - "name": "proteinTranslation.test.ex20" + "name": "Sequence of two different protein codons translates into proteins", + "test_code": "let\n Test.label.deprecated \"Sequence of two different protein codons translates into proteins\" <| Test.expect (proteins \"UUAUUG\" === [\"Leucine\", \"Leucine\"])" }, { - "test_code": "proteinTranslation.test.ex21 = let\n Test.label \"Translate RNA strand into correct protein list\" <| Test.expect (proteins \"AUGUUUUGG\" === [\"Methionine\", \"Phenylalanine\", \"Tryptophan\"])", - "name": "proteinTranslation.test.ex21" + "name": "Translate RNA strand into correct protein list", + "test_code": "let\n Test.label.deprecated \"Translate RNA strand into correct protein list\" <| Test.expect (proteins \"AUGUUUUGG\" === [\"Methionine\", \"Phenylalanine\", \"Tryptophan\"])" }, { - "test_code": "proteinTranslation.test.ex22 = let\n Test.label \"Translation stops if STOP codon at beginning of sequence\" <| Test.expect (proteins \"UAGUGG\" === [])", - "name": "proteinTranslation.test.ex22" + "name": "Translation stops if STOP codon at beginning of sequence", + "test_code": "let\n Test.label.deprecated \"Translation stops if STOP codon at beginning of sequence\" <| Test.expect (proteins \"UAGUGG\" === [])" }, { - "test_code": "proteinTranslation.test.ex23 = let\n Test.label \"Translation stops if STOP codon at end of two-codon sequence\" <| Test.expect (proteins \"UGGUAG\" === [\"Tryptophan\"])", - "name": "proteinTranslation.test.ex23" + "name": "Translation stops if STOP codon at end of two-codon sequence", + "test_code": "let\n Test.label.deprecated \"Translation stops if STOP codon at end of two-codon sequence\" <| Test.expect (proteins \"UGGUAG\" === [\"Tryptophan\"])" }, { - "test_code": "proteinTranslation.test.ex24 = let\n Test.label \"Translation stops if STOP codon at end of three-codon sequence\" <| Test.expect (proteins \"AUGUUUUAA\" === [\"Methionine\", \"Phenylalanine\"])", - "name": "proteinTranslation.test.ex24" + "name": "Translation stops if STOP codon at end of three-codon sequence", + "test_code": "let\n Test.label.deprecated \"Translation stops if STOP codon at end of three-codon sequence\" <| Test.expect (proteins \"AUGUUUUAA\" === [\"Methionine\", \"Phenylalanine\"])" }, { - "test_code": "proteinTranslation.test.ex25 = let\n Test.label \"Translation stops if STOP codon in middle of three-codon sequence\" <| Test.expect (proteins \"UGGUAGUGG\" === [\"Tryptophan\"])", - "name": "proteinTranslation.test.ex25" + "name": "Translation stops if STOP codon in middle of three-codon sequence", + "test_code": "let\n Test.label.deprecated \"Translation stops if STOP codon in middle of three-codon sequence\" <| Test.expect (proteins \"UGGUAGUGG\" === [\"Tryptophan\"])" }, { - "test_code": "proteinTranslation.test.ex26 = let\n Test.label \"Translation stops if STOP codon in middle of six-codon sequence\" <| Test.expect (proteins \"UGGUGUUAUUAAUGGUUU\" === [\"Tryptophan\", \"Cysteine\", \"Tyrosine\"])", - "name": "proteinTranslation.test.ex26" + "name": "Translation stops if STOP codon in middle of six-codon sequence", + "test_code": "let\n Test.label.deprecated \"Translation stops if STOP codon in middle of six-codon sequence\" <| Test.expect (proteins \"UGGUGUUAUUAAUGGUUU\" === [\"Tryptophan\", \"Cysteine\", \"Tyrosine\"])" } -] +] \ No newline at end of file diff --git a/exercises/practice/protein-translation/.meta/testLoader.md b/exercises/practice/protein-translation/.meta/testLoader.md index 92cd5b7..dc047fd 100644 --- a/exercises/practice/protein-translation/.meta/testLoader.md +++ b/exercises/practice/protein-translation/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for protein-translation exercise ```ucm -.> load ./proteinTranslation.u -.> add -.> load ./proteinTranslation.test.u -.> add -.> move.term proteinTranslation.tests tests +scratch/main> load ./proteinTranslation.u +scratch/main> add +scratch/main> load ./proteinTranslation.test.u +scratch/main> add +scratch/main> move.term proteinTranslation.tests tests ``` diff --git a/exercises/practice/protein-translation/proteinTranslation.test.u b/exercises/practice/protein-translation/proteinTranslation.test.u index 2cbc38d..f33e247 100644 --- a/exercises/practice/protein-translation/proteinTranslation.test.u +++ b/exercises/practice/protein-translation/proteinTranslation.test.u @@ -1,80 +1,80 @@ proteinTranslation.test.ex1 = let - Test.label "Empty RNA sequence results in no proteins" <| Test.expect (proteins "" === []) + Test.label.deprecated "Empty RNA sequence results in no proteins" <| Test.expect (proteins "" === []) proteinTranslation.test.ex2 = let - Test.label "Methionine RNA sequence" <| Test.expect (proteins "AUG" === ["Methionine"]) + Test.label.deprecated "Methionine RNA sequence" <| Test.expect (proteins "AUG" === ["Methionine"]) proteinTranslation.test.ex3 = let - Test.label "Phenylalanine RNA sequence 1" <| Test.expect (proteins "UUU" === ["Phenylalanine"]) + Test.label.deprecated "Phenylalanine RNA sequence 1" <| Test.expect (proteins "UUU" === ["Phenylalanine"]) proteinTranslation.test.ex4 = let - Test.label "Phenylalanine RNA sequence 2" <| Test.expect (proteins "UUC" === ["Phenylalanine"]) + Test.label.deprecated "Phenylalanine RNA sequence 2" <| Test.expect (proteins "UUC" === ["Phenylalanine"]) proteinTranslation.test.ex5 = let - Test.label "Leucine RNA sequence 1" <| Test.expect (proteins "UUA" === ["Leucine"]) + Test.label.deprecated "Leucine RNA sequence 1" <| Test.expect (proteins "UUA" === ["Leucine"]) proteinTranslation.test.ex6 = let - Test.label "Leucine RNA sequence 2" <| Test.expect (proteins "UUG" === ["Leucine"]) + Test.label.deprecated "Leucine RNA sequence 2" <| Test.expect (proteins "UUG" === ["Leucine"]) proteinTranslation.test.ex7 = let - Test.label "Serine RNA sequence 1" <| Test.expect (proteins "UCU" === ["Serine"]) + Test.label.deprecated "Serine RNA sequence 1" <| Test.expect (proteins "UCU" === ["Serine"]) proteinTranslation.test.ex8 = let - Test.label "Serine RNA sequence 2" <| Test.expect (proteins "UCC" === ["Serine"]) + Test.label.deprecated "Serine RNA sequence 2" <| Test.expect (proteins "UCC" === ["Serine"]) proteinTranslation.test.ex9 = let - Test.label "Serine RNA sequence 3" <| Test.expect (proteins "UCA" === ["Serine"]) + Test.label.deprecated "Serine RNA sequence 3" <| Test.expect (proteins "UCA" === ["Serine"]) proteinTranslation.test.ex10 = let - Test.label "Serine RNA sequence 4" <| Test.expect (proteins "UCG" === ["Serine"]) + Test.label.deprecated "Serine RNA sequence 4" <| Test.expect (proteins "UCG" === ["Serine"]) proteinTranslation.test.ex11 = let - Test.label "Tyrosine RNA sequence 1" <| Test.expect (proteins "UAU" === ["Tyrosine"]) + Test.label.deprecated "Tyrosine RNA sequence 1" <| Test.expect (proteins "UAU" === ["Tyrosine"]) proteinTranslation.test.ex12 = let - Test.label "Tyrosine RNA sequence 2" <| Test.expect (proteins "UAC" === ["Tyrosine"]) + Test.label.deprecated "Tyrosine RNA sequence 2" <| Test.expect (proteins "UAC" === ["Tyrosine"]) proteinTranslation.test.ex13 = let - Test.label "Cysteine RNA sequence 1" <| Test.expect (proteins "UGU" === ["Cysteine"]) + Test.label.deprecated "Cysteine RNA sequence 1" <| Test.expect (proteins "UGU" === ["Cysteine"]) proteinTranslation.test.ex14 = let - Test.label "Cysteine RNA sequence 2" <| Test.expect (proteins "UGC" === ["Cysteine"]) + Test.label.deprecated "Cysteine RNA sequence 2" <| Test.expect (proteins "UGC" === ["Cysteine"]) proteinTranslation.test.ex15 = let - Test.label "Tryptophan RNA sequence" <| Test.expect (proteins "UGG" === ["Tryptophan"]) + Test.label.deprecated "Tryptophan RNA sequence" <| Test.expect (proteins "UGG" === ["Tryptophan"]) proteinTranslation.test.ex16 = let - Test.label "STOP codon RNA sequence 1" <| Test.expect (proteins "UAA" === []) + Test.label.deprecated "STOP codon RNA sequence 1" <| Test.expect (proteins "UAA" === []) proteinTranslation.test.ex17 = let - Test.label "STOP codon RNA sequence 2" <| Test.expect (proteins "UAG" === []) + Test.label.deprecated "STOP codon RNA sequence 2" <| Test.expect (proteins "UAG" === []) proteinTranslation.test.ex18 = let - Test.label "STOP codon RNA sequence 3" <| Test.expect (proteins "UGA" === []) + Test.label.deprecated "STOP codon RNA sequence 3" <| Test.expect (proteins "UGA" === []) proteinTranslation.test.ex19 = let - Test.label "Sequence of two protein codons translates into proteins" <| Test.expect (proteins "UUUUUU" === ["Phenylalanine", "Phenylalanine"]) + Test.label.deprecated "Sequence of two protein codons translates into proteins" <| Test.expect (proteins "UUUUUU" === ["Phenylalanine", "Phenylalanine"]) proteinTranslation.test.ex20 = let - Test.label "Sequence of two different protein codons translates into proteins" <| Test.expect (proteins "UUAUUG" === ["Leucine", "Leucine"]) + Test.label.deprecated "Sequence of two different protein codons translates into proteins" <| Test.expect (proteins "UUAUUG" === ["Leucine", "Leucine"]) proteinTranslation.test.ex21 = let - Test.label "Translate RNA strand into correct protein list" <| Test.expect (proteins "AUGUUUUGG" === ["Methionine", "Phenylalanine", "Tryptophan"]) + Test.label.deprecated "Translate RNA strand into correct protein list" <| Test.expect (proteins "AUGUUUUGG" === ["Methionine", "Phenylalanine", "Tryptophan"]) proteinTranslation.test.ex22 = let - Test.label "Translation stops if STOP codon at beginning of sequence" <| Test.expect (proteins "UAGUGG" === []) + Test.label.deprecated "Translation stops if STOP codon at beginning of sequence" <| Test.expect (proteins "UAGUGG" === []) proteinTranslation.test.ex23 = let - Test.label "Translation stops if STOP codon at end of two-codon sequence" <| Test.expect (proteins "UGGUAG" === ["Tryptophan"]) + Test.label.deprecated "Translation stops if STOP codon at end of two-codon sequence" <| Test.expect (proteins "UGGUAG" === ["Tryptophan"]) proteinTranslation.test.ex24 = let - Test.label "Translation stops if STOP codon at end of three-codon sequence" <| Test.expect (proteins "AUGUUUUAA" === ["Methionine", "Phenylalanine"]) + Test.label.deprecated "Translation stops if STOP codon at end of three-codon sequence" <| Test.expect (proteins "AUGUUUUAA" === ["Methionine", "Phenylalanine"]) proteinTranslation.test.ex25 = let - Test.label "Translation stops if STOP codon in middle of three-codon sequence" <| Test.expect (proteins "UGGUAGUGG" === ["Tryptophan"]) + Test.label.deprecated "Translation stops if STOP codon in middle of three-codon sequence" <| Test.expect (proteins "UGGUAGUGG" === ["Tryptophan"]) proteinTranslation.test.ex26 = let - Test.label "Translation stops if STOP codon in middle of six-codon sequence" <| Test.expect (proteins "UGGUGUUAUUAAUGGUUU" === ["Tryptophan", "Cysteine", "Tyrosine"]) + Test.label.deprecated "Translation stops if STOP codon in middle of six-codon sequence" <| Test.expect (proteins "UGGUGUUAUUAAUGGUUU" === ["Tryptophan", "Cysteine", "Tyrosine"]) test> proteinTranslation.tests = runAll [ proteinTranslation.test.ex1, diff --git a/exercises/practice/queen-attack/.meta/testAnnotation.json b/exercises/practice/queen-attack/.meta/testAnnotation.json index 8079816..de031b4 100644 --- a/exercises/practice/queen-attack/.meta/testAnnotation.json +++ b/exercises/practice/queen-attack/.meta/testAnnotation.json @@ -1,46 +1,46 @@ [ { - "test_code": "queenAttack.test.ex1 = let\n\tTest.label \"queen with a valid position\" <| Test.expect (toOptional! '(create (2,2)) === Some (2,2))", - "name": "queenAttack.test.ex1" + "name": "queen with a valid position", + "test_code": "let\n Test.label.deprecated \"queen with a valid position\" <| Test.expect (toOptional! '(create (2,2)) === Some (2,2))" }, { - "test_code": "queenAttack.test.ex2 = let\n\tTest.label \"queen must have row on board\" <| Test.expect (toOptional! '(create (4,8)) === None)", - "name": "queenAttack.test.ex2" + "name": "queen must have row on board", + "test_code": "let\n Test.label.deprecated \"queen must have row on board\" <| Test.expect (toOptional! '(create (8,4)) === None)" }, { - "test_code": "queenAttack.test.ex3 = let\n\tTest.label \"queen must have column on board\" <| Test.expect (toOptional! '(create (4,8)) === None)", - "name": "queenAttack.test.ex3" + "name": "queen must have column on board", + "test_code": "let\n Test.label.deprecated \"queen must have column on board\" <| Test.expect (toOptional! '(create (4,8)) === None)" }, { - "test_code": "queenAttack.test.ex4 = let\n\tTest.label \"cannot attack\" <| Test.expect (toOptional! '(canAttack (2,4) (6,6)) === Some false)", - "name": "queenAttack.test.ex4" + "name": "cannot attack", + "test_code": "let\n Test.label.deprecated \"cannot attack\" <| Test.expect (toOptional! '(canAttack (2,4) (6,6)) === Some false)" }, { - "test_code": "queenAttack.test.ex5 = let\n\tTest.label \"can attack on same row\" <| Test.expect (toOptional! '(canAttack (2,4) (2,6)) === Some true)", - "name": "queenAttack.test.ex5" + "name": "can attack on same row", + "test_code": "let\n Test.label.deprecated \"can attack on same row\" <| Test.expect (toOptional! '(canAttack (2,4) (2,6)) === Some true)" }, { - "test_code": "queenAttack.test.ex6 = let\n\tTest.label \"can attack on same column\" <| Test.expect (toOptional! '(canAttack (4,5) (2,5)) === Some true)", - "name": "queenAttack.test.ex6" + "name": "can attack on same column", + "test_code": "let\n Test.label.deprecated \"can attack on same column\" <| Test.expect (toOptional! '(canAttack (4,5) (2,5)) === Some true)" }, { - "test_code": "queenAttack.test.ex7 = let\n\tTest.label \"can attack on first diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (0,4)) === Some true)", - "name": "queenAttack.test.ex7" + "name": "can attack on first diagonal", + "test_code": "let\n Test.label.deprecated \"can attack on first diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (0,4)) === Some true)" }, { - "test_code": "queenAttack.test.ex8 = let\n\tTest.label \"can attack on second diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (3,1)) === Some true)", - "name": "queenAttack.test.ex8" + "name": "can attack on second diagonal", + "test_code": "let\n Test.label.deprecated \"can attack on second diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (3,1)) === Some true)" }, { - "test_code": "queenAttack.test.ex9 = let\n\tTest.label \"can attack on third diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (1,1)) === Some true)", - "name": "queenAttack.test.ex9" + "name": "can attack on third diagonal", + "test_code": "let\n Test.label.deprecated \"can attack on third diagonal\" <| Test.expect (toOptional! '(canAttack (2,2) (1,1)) === Some true)" }, { - "test_code": "queenAttack.test.ex10 = let\n\tTest.label \"can attack on fourth diagonal\" <| Test.expect (toOptional! '(canAttack (1,7) (0,6)) === Some true)", - "name": "queenAttack.test.ex10" + "name": "can attack on fourth diagonal", + "test_code": "let\n Test.label.deprecated \"can attack on fourth diagonal\" <| Test.expect (toOptional! '(canAttack (1,7) (0,6)) === Some true)" }, { - "test_code": "queenAttack.test.ex11 = let\n\tTest.label \"cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal\" <| Test.expect (toOptional! '(canAttack (4,1) (2,5)) === Some false)", - "name": "queenAttack.test.ex11" + "name": "cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal", + "test_code": "let\n Test.label.deprecated \"cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal\" <| Test.expect (toOptional! '(canAttack (4,1) (2,5)) === Some false)" } -] +] \ No newline at end of file diff --git a/exercises/practice/queen-attack/.meta/testLoader.md b/exercises/practice/queen-attack/.meta/testLoader.md index 1b06e33..3a7aef5 100644 --- a/exercises/practice/queen-attack/.meta/testLoader.md +++ b/exercises/practice/queen-attack/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./queen.u -.> add -.> load ./queen.test.u -.> add -.> move.term queenAttack.tests tests +scratch/main> load ./queen.u +scratch/main> add +scratch/main> load ./queen.test.u +scratch/main> add +scratch/main> move.term queenAttack.tests tests ``` diff --git a/exercises/practice/queen-attack/queen.test.u b/exercises/practice/queen-attack/queen.test.u index 38e5a95..d498c71 100644 --- a/exercises/practice/queen-attack/queen.test.u +++ b/exercises/practice/queen-attack/queen.test.u @@ -1,35 +1,35 @@ queenAttack.test.ex1 = let - Test.label "queen with a valid position" <| Test.expect (toOptional! '(create (2,2)) === Some (2,2)) + Test.label.deprecated "queen with a valid position" <| Test.expect (toOptional! '(create (2,2)) === Some (2,2)) queenAttack.test.ex2 = let - Test.label "queen must have row on board" <| Test.expect (toOptional! '(create (8,4)) === None) + Test.label.deprecated "queen must have row on board" <| Test.expect (toOptional! '(create (8,4)) === None) queenAttack.test.ex3 = let - Test.label "queen must have column on board" <| Test.expect (toOptional! '(create (4,8)) === None) + Test.label.deprecated "queen must have column on board" <| Test.expect (toOptional! '(create (4,8)) === None) queenAttack.test.ex4 = let - Test.label "cannot attack" <| Test.expect (toOptional! '(canAttack (2,4) (6,6)) === Some false) + Test.label.deprecated "cannot attack" <| Test.expect (toOptional! '(canAttack (2,4) (6,6)) === Some false) queenAttack.test.ex5 = let - Test.label "can attack on same row" <| Test.expect (toOptional! '(canAttack (2,4) (2,6)) === Some true) + Test.label.deprecated "can attack on same row" <| Test.expect (toOptional! '(canAttack (2,4) (2,6)) === Some true) queenAttack.test.ex6 = let - Test.label "can attack on same column" <| Test.expect (toOptional! '(canAttack (4,5) (2,5)) === Some true) + Test.label.deprecated "can attack on same column" <| Test.expect (toOptional! '(canAttack (4,5) (2,5)) === Some true) queenAttack.test.ex7 = let - Test.label "can attack on first diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (0,4)) === Some true) + Test.label.deprecated "can attack on first diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (0,4)) === Some true) queenAttack.test.ex8 = let - Test.label "can attack on second diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (3,1)) === Some true) + Test.label.deprecated "can attack on second diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (3,1)) === Some true) queenAttack.test.ex9 = let - Test.label "can attack on third diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (1,1)) === Some true) + Test.label.deprecated "can attack on third diagonal" <| Test.expect (toOptional! '(canAttack (2,2) (1,1)) === Some true) queenAttack.test.ex10 = let - Test.label "can attack on fourth diagonal" <| Test.expect (toOptional! '(canAttack (1,7) (0,6)) === Some true) + Test.label.deprecated "can attack on fourth diagonal" <| Test.expect (toOptional! '(canAttack (1,7) (0,6)) === Some true) queenAttack.test.ex11 = let - Test.label "cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal" <| Test.expect (toOptional! '(canAttack (4,1) (2,5)) === Some false) + Test.label.deprecated "cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal" <| Test.expect (toOptional! '(canAttack (4,1) (2,5)) === Some false) test> queenAttack.tests = runAll [ queenAttack.test.ex1, diff --git a/exercises/practice/raindrops/.meta/testAnnotation.json b/exercises/practice/raindrops/.meta/testAnnotation.json index cfd1993..0d32815 100644 --- a/exercises/practice/raindrops/.meta/testAnnotation.json +++ b/exercises/practice/raindrops/.meta/testAnnotation.json @@ -1,74 +1,74 @@ [ { - "test_code": "raindrops.test.ex1 = let\n\tTest.label \"the sound for 1 is 1\" <| Test.expect (convert 1 === \"1\")", - "name": "raindrops.test.ex1" + "name": "the sound for 1 is 1", + "test_code": "let\n Test.label.deprecated \"the sound for 1 is 1\" <| Test.expect (convert 1 === \"1\")" }, { - "test_code": "raindrops.test.ex2 = let\n\tTest.label \"the sound for 3 is Pling\" <| Test.expect (convert 3 === \"Pling\")", - "name": "raindrops.test.ex2" + "name": "the sound for 3 is Pling", + "test_code": "let\n Test.label.deprecated \"the sound for 3 is Pling\" <| Test.expect (convert 3 === \"Pling\")" }, { - "test_code": "raindrops.test.ex3 = let\n\tTest.label \"the sound for 5 is Plang\" <| Test.expect (convert 5 === \"Plang\")", - "name": "raindrops.test.ex3" + "name": "the sound for 5 is Plang", + "test_code": "let\n Test.label.deprecated \"the sound for 5 is Plang\" <| Test.expect (convert 5 === \"Plang\")" }, { - "test_code": "raindrops.test.ex4 = let\n\tTest.label \"the sound for 7 is Plong\" <| Test.expect (convert 7 === \"Plong\")", - "name": "raindrops.test.ex4" + "name": "the sound for 7 is Plong", + "test_code": "let\n Test.label.deprecated \"the sound for 7 is Plong\" <| Test.expect (convert 7 === \"Plong\")" }, { - "test_code": "raindrops.test.ex5 = let\n\tTest.label \"the sound for 6 is Pling as it has a factor 3\" <| Test.expect (convert 6 === \"Pling\")", - "name": "raindrops.test.ex5" + "name": "the sound for 6 is Pling as it has a factor 3", + "test_code": "let\n Test.label.deprecated \"the sound for 6 is Pling as it has a factor 3\" <| Test.expect (convert 6 === \"Pling\")" }, { - "test_code": "raindrops.test.ex6 = let\n\tTest.label \"2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base\" <| Test.expect (convert 8 === \"8\")", - "name": "raindrops.test.ex6" + "name": "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base", + "test_code": "let\n Test.label.deprecated \"2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base\" <| Test.expect (convert 8 === \"8\")" }, { - "test_code": "raindrops.test.ex7 = let\n\tTest.label \"the sound for 9 is Pling as it has a factor 3\" <| Test.expect (convert 9 === \"Pling\")", - "name": "raindrops.test.ex7" + "name": "the sound for 9 is Pling as it has a factor 3", + "test_code": "let\n Test.label.deprecated \"the sound for 9 is Pling as it has a factor 3\" <| Test.expect (convert 9 === \"Pling\")" }, { - "test_code": "raindrops.test.ex8 = let\n\tTest.label \"the sound for 10 is Plang as it has a factor 5\" <| Test.expect (convert 10 === \"Plang\")", - "name": "raindrops.test.ex8" + "name": "the sound for 10 is Plang as it has a factor 5", + "test_code": "let\n Test.label.deprecated \"the sound for 10 is Plang as it has a factor 5\" <| Test.expect (convert 10 === \"Plang\")" }, { - "test_code": "raindrops.test.ex9 = let\n\tTest.label \"the sound for 14 is Plong as it has a factor of 7\" <| Test.expect (convert 14 === \"Plong\")", - "name": "raindrops.test.ex9" + "name": "the sound for 14 is Plong as it has a factor of 7", + "test_code": "let\n Test.label.deprecated \"the sound for 14 is Plong as it has a factor of 7\" <| Test.expect (convert 14 === \"Plong\")" }, { - "test_code": "raindrops.test.ex10 = let\n\tTest.label \"the sound for 15 is PlingPlang as it has factors 3 and 5\" <| Test.expect (convert 15 === \"PlingPlang\")", - "name": "raindrops.test.ex10" + "name": "the sound for 15 is PlingPlang as it has factors 3 and 5", + "test_code": "let\n Test.label.deprecated \"the sound for 15 is PlingPlang as it has factors 3 and 5\" <| Test.expect (convert 15 === \"PlingPlang\")" }, { - "test_code": "raindrops.test.ex11 = let\n\tTest.label \"the sound for 21 is PlingPlong as it has factors 3 and 7\" <| Test.expect (convert 21 === \"PlingPlong\")", - "name": "raindrops.test.ex11" + "name": "the sound for 21 is PlingPlong as it has factors 3 and 7", + "test_code": "let\n Test.label.deprecated \"the sound for 21 is PlingPlong as it has factors 3 and 7\" <| Test.expect (convert 21 === \"PlingPlong\")" }, { - "test_code": "raindrops.test.ex12 = let\n\tTest.label \"the sound for 25 is Plang as it has a factor 5\" <| Test.expect (convert 25 === \"Plang\")", - "name": "raindrops.test.ex12" + "name": "the sound for 25 is Plang as it has a factor 5", + "test_code": "let\n Test.label.deprecated \"the sound for 25 is Plang as it has a factor 5\" <| Test.expect (convert 25 === \"Plang\")" }, { - "test_code": "raindrops.test.ex13 = let\n\tTest.label \"the sound for 27 is Pling as it has a factor 3\" <| Test.expect (convert 27 === \"Pling\")", - "name": "raindrops.test.ex13" + "name": "the sound for 27 is Pling as it has a factor 3", + "test_code": "let\n Test.label.deprecated \"the sound for 27 is Pling as it has a factor 3\" <| Test.expect (convert 27 === \"Pling\")" }, { - "test_code": "raindrops.test.ex14 = let\n\tTest.label \"the sound for 35 is PlangPlong as it has factors 5 and 7\" <| Test.expect (convert 35 === \"PlangPlong\")", - "name": "raindrops.test.ex14" + "name": "the sound for 35 is PlangPlong as it has factors 5 and 7", + "test_code": "let\n Test.label.deprecated \"the sound for 35 is PlangPlong as it has factors 5 and 7\" <| Test.expect (convert 35 === \"PlangPlong\")" }, { - "test_code": "raindrops.test.ex15 = let\n\tTest.label \"the sound for 49 is Plong as it has a factor 7\" <| Test.expect (convert 49 === \"Plong\")", - "name": "raindrops.test.ex15" + "name": "the sound for 49 is Plong as it has a factor 7", + "test_code": "let\n Test.label.deprecated \"the sound for 49 is Plong as it has a factor 7\" <| Test.expect (convert 49 === \"Plong\")" }, { - "test_code": "raindrops.test.ex16 = let\n\tTest.label \"the sound for 52 is 52\" <| Test.expect (convert 52 === \"52\")", - "name": "raindrops.test.ex16" + "name": "the sound for 52 is 52", + "test_code": "let\n Test.label.deprecated \"the sound for 52 is 52\" <| Test.expect (convert 52 === \"52\")" }, { - "test_code": "raindrops.test.ex17 = let\n\tTest.label \"the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7\" <| Test.expect (convert 105 === \"PlingPlangPlong\")", - "name": "raindrops.test.ex17" + "name": "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7", + "test_code": "let\n Test.label.deprecated \"the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7\" <| Test.expect (convert 105 === \"PlingPlangPlong\")" }, { - "test_code": "raindrops.test.ex18 = let\n\tTest.label \"the sound for 3125 is Plang as it has a factor 5\" <| Test.expect (convert 3125 === \"Plang\")", - "name": "raindrops.test.ex18" + "name": "the sound for 3125 is Plang as it has a factor 5", + "test_code": "let\n Test.label.deprecated \"the sound for 3125 is Plang as it has a factor 5\" <| Test.expect (convert 3125 === \"Plang\")" } -] +] \ No newline at end of file diff --git a/exercises/practice/raindrops/.meta/testLoader.md b/exercises/practice/raindrops/.meta/testLoader.md index 9da8a27..4237630 100644 --- a/exercises/practice/raindrops/.meta/testLoader.md +++ b/exercises/practice/raindrops/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./raindrops.u -.> add -.> load ./raindrops.test.u -.> add -.> move.term raindrops.tests tests +scratch/main> load ./raindrops.u +scratch/main> add +scratch/main> load ./raindrops.test.u +scratch/main> add +scratch/main> move.term raindrops.tests tests ``` diff --git a/exercises/practice/raindrops/raindrops.test.u b/exercises/practice/raindrops/raindrops.test.u index cf51605..fd97f86 100644 --- a/exercises/practice/raindrops/raindrops.test.u +++ b/exercises/practice/raindrops/raindrops.test.u @@ -1,56 +1,56 @@ raindrops.test.ex1 = let - Test.label "the sound for 1 is 1" <| Test.expect (convert 1 === "1") + Test.label.deprecated "the sound for 1 is 1" <| Test.expect (convert 1 === "1") raindrops.test.ex2 = let - Test.label "the sound for 3 is Pling" <| Test.expect (convert 3 === "Pling") + Test.label.deprecated "the sound for 3 is Pling" <| Test.expect (convert 3 === "Pling") raindrops.test.ex3 = let - Test.label "the sound for 5 is Plang" <| Test.expect (convert 5 === "Plang") + Test.label.deprecated "the sound for 5 is Plang" <| Test.expect (convert 5 === "Plang") raindrops.test.ex4 = let - Test.label "the sound for 7 is Plong" <| Test.expect (convert 7 === "Plong") + Test.label.deprecated "the sound for 7 is Plong" <| Test.expect (convert 7 === "Plong") raindrops.test.ex5 = let - Test.label "the sound for 6 is Pling as it has a factor 3" <| Test.expect (convert 6 === "Pling") + Test.label.deprecated "the sound for 6 is Pling as it has a factor 3" <| Test.expect (convert 6 === "Pling") raindrops.test.ex6 = let - Test.label "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base" <| Test.expect (convert 8 === "8") + Test.label.deprecated "2 to the power 3 does not make a raindrop sound as 3 is the exponent not the base" <| Test.expect (convert 8 === "8") raindrops.test.ex7 = let - Test.label "the sound for 9 is Pling as it has a factor 3" <| Test.expect (convert 9 === "Pling") + Test.label.deprecated "the sound for 9 is Pling as it has a factor 3" <| Test.expect (convert 9 === "Pling") raindrops.test.ex8 = let - Test.label "the sound for 10 is Plang as it has a factor 5" <| Test.expect (convert 10 === "Plang") + Test.label.deprecated "the sound for 10 is Plang as it has a factor 5" <| Test.expect (convert 10 === "Plang") raindrops.test.ex9 = let - Test.label "the sound for 14 is Plong as it has a factor of 7" <| Test.expect (convert 14 === "Plong") + Test.label.deprecated "the sound for 14 is Plong as it has a factor of 7" <| Test.expect (convert 14 === "Plong") raindrops.test.ex10 = let - Test.label "the sound for 15 is PlingPlang as it has factors 3 and 5" <| Test.expect (convert 15 === "PlingPlang") + Test.label.deprecated "the sound for 15 is PlingPlang as it has factors 3 and 5" <| Test.expect (convert 15 === "PlingPlang") raindrops.test.ex11 = let - Test.label "the sound for 21 is PlingPlong as it has factors 3 and 7" <| Test.expect (convert 21 === "PlingPlong") + Test.label.deprecated "the sound for 21 is PlingPlong as it has factors 3 and 7" <| Test.expect (convert 21 === "PlingPlong") raindrops.test.ex12 = let - Test.label "the sound for 25 is Plang as it has a factor 5" <| Test.expect (convert 25 === "Plang") + Test.label.deprecated "the sound for 25 is Plang as it has a factor 5" <| Test.expect (convert 25 === "Plang") raindrops.test.ex13 = let - Test.label "the sound for 27 is Pling as it has a factor 3" <| Test.expect (convert 27 === "Pling") + Test.label.deprecated "the sound for 27 is Pling as it has a factor 3" <| Test.expect (convert 27 === "Pling") raindrops.test.ex14 = let - Test.label "the sound for 35 is PlangPlong as it has factors 5 and 7" <| Test.expect (convert 35 === "PlangPlong") + Test.label.deprecated "the sound for 35 is PlangPlong as it has factors 5 and 7" <| Test.expect (convert 35 === "PlangPlong") raindrops.test.ex15 = let - Test.label "the sound for 49 is Plong as it has a factor 7" <| Test.expect (convert 49 === "Plong") + Test.label.deprecated "the sound for 49 is Plong as it has a factor 7" <| Test.expect (convert 49 === "Plong") raindrops.test.ex16 = let - Test.label "the sound for 52 is 52" <| Test.expect (convert 52 === "52") + Test.label.deprecated "the sound for 52 is 52" <| Test.expect (convert 52 === "52") raindrops.test.ex17 = let - Test.label "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7" <| Test.expect (convert 105 === "PlingPlangPlong") + Test.label.deprecated "the sound for 105 is PlingPlangPlong as it has factors 3, 5 and 7" <| Test.expect (convert 105 === "PlingPlangPlong") raindrops.test.ex18 = let - Test.label "the sound for 3125 is Plang as it has a factor 5" <| Test.expect (convert 3125 === "Plang") + Test.label.deprecated "the sound for 3125 is Plang as it has a factor 5" <| Test.expect (convert 3125 === "Plang") test> raindrops.tests = runAll [ raindrops.test.ex1, diff --git a/exercises/practice/reverse-string/.meta/testAnnotation.json b/exercises/practice/reverse-string/.meta/testAnnotation.json index fe7213e..460143f 100644 --- a/exercises/practice/reverse-string/.meta/testAnnotation.json +++ b/exercises/practice/reverse-string/.meta/testAnnotation.json @@ -1,26 +1,26 @@ [ { - "test_code": "reverseString.test.ex1 = let\n Test.label \"An empty string\" <| Test.expect (reverseString.reverse \"\" === \"\")", - "name": "reverseString.test.ex1" + "name": "An empty string", + "test_code": "let\n Test.label.deprecated \"An empty string\" <| Test.expect (reverseString.reverse \"\" === \"\")" }, { - "test_code": "reverseString.test.ex2 = let\n Test.label \"A word\" <| Test.expect (reverseString.reverse \"robot\" === \"tobor\")", - "name": "reverseString.test.ex2" + "name": "A word", + "test_code": "let\n Test.label.deprecated \"A word\" <| Test.expect (reverseString.reverse \"robot\" === \"tobor\")" }, { - "test_code": "reverseString.test.ex3 = let\n Test.label \"A capitalized word\" <| Test.expect (reverseString.reverse \"Ramen\" === \"nemaR\")", - "name": "reverseString.test.ex3" + "name": "A capitalized word", + "test_code": "let\n Test.label.deprecated \"A capitalized word\" <| Test.expect (reverseString.reverse \"Ramen\" === \"nemaR\")" }, { - "test_code": "reverseString.test.ex4 = let\n Test.label \"A sentence with punctuation\" <| Test.expect (reverseString.reverse \"I'm hungry!\" === \"!yrgnuh m'I\")", - "name": "reverseString.test.ex4" + "name": "A sentence with punctuation", + "test_code": "let\n Test.label.deprecated \"A sentence with punctuation\" <| Test.expect (reverseString.reverse \"I'm hungry!\" === \"!yrgnuh m'I\")" }, { - "test_code": "reverseString.test.ex5 = let\n Test.label \"A palindrome\" <| Test.expect (reverseString.reverse \"racecar\" === \"racecar\")", - "name": "reverseString.test.ex5" + "name": "A palindrome", + "test_code": "let\n Test.label.deprecated \"A palindrome\" <| Test.expect (reverseString.reverse \"racecar\" === \"racecar\")" }, { - "test_code": "reverseString.test.ex6 = let\n Test.label \"An even-sized word\" <| Test.expect (reverseString.reverse \"drawer\" === \"reward\")", - "name": "reverseString.test.ex6" + "name": "An even-sized word", + "test_code": "let\n Test.label.deprecated \"An even-sized word\" <| Test.expect (reverseString.reverse \"drawer\" === \"reward\")" } -] +] \ No newline at end of file diff --git a/exercises/practice/reverse-string/.meta/testLoader.md b/exercises/practice/reverse-string/.meta/testLoader.md index e9e40db..d92e9ec 100644 --- a/exercises/practice/reverse-string/.meta/testLoader.md +++ b/exercises/practice/reverse-string/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for reverse-string exercise ```ucm -.> load ./reverseString.u -.> add -.> load ./reverseString.test.u -.> add -.> move.term reverseString.tests tests +scratch/main> load ./reverseString.u +scratch/main> add +scratch/main> load ./reverseString.test.u +scratch/main> add +scratch/main> move.term reverseString.tests tests ``` diff --git a/exercises/practice/reverse-string/reverseString.test.u b/exercises/practice/reverse-string/reverseString.test.u index b37ee18..8fad8a4 100644 --- a/exercises/practice/reverse-string/reverseString.test.u +++ b/exercises/practice/reverse-string/reverseString.test.u @@ -1,20 +1,20 @@ reverseString.test.ex1 = let - Test.label "An empty string" <| Test.expect (reverseString.reverse "" === "") + Test.label.deprecated "An empty string" <| Test.expect (reverseString.reverse "" === "") reverseString.test.ex2 = let - Test.label "A word" <| Test.expect (reverseString.reverse "robot" === "tobor") + Test.label.deprecated "A word" <| Test.expect (reverseString.reverse "robot" === "tobor") reverseString.test.ex3 = let - Test.label "A capitalized word" <| Test.expect (reverseString.reverse "Ramen" === "nemaR") + Test.label.deprecated "A capitalized word" <| Test.expect (reverseString.reverse "Ramen" === "nemaR") reverseString.test.ex4 = let - Test.label "A sentence with punctuation" <| Test.expect (reverseString.reverse "I'm hungry!" === "!yrgnuh m'I") + Test.label.deprecated "A sentence with punctuation" <| Test.expect (reverseString.reverse "I'm hungry!" === "!yrgnuh m'I") reverseString.test.ex5 = let - Test.label "A palindrome" <| Test.expect (reverseString.reverse "racecar" === "racecar") + Test.label.deprecated "A palindrome" <| Test.expect (reverseString.reverse "racecar" === "racecar") reverseString.test.ex6 = let - Test.label "An even-sized word" <| Test.expect (reverseString.reverse "drawer" === "reward") + Test.label.deprecated "An even-sized word" <| Test.expect (reverseString.reverse "drawer" === "reward") test> reverseString.tests = runAll [ reverseString.test.ex1, diff --git a/exercises/practice/rna-transcription/.meta/testAnnotation.json b/exercises/practice/rna-transcription/.meta/testAnnotation.json index 5732df4..d8b4382 100644 --- a/exercises/practice/rna-transcription/.meta/testAnnotation.json +++ b/exercises/practice/rna-transcription/.meta/testAnnotation.json @@ -1,30 +1,30 @@ [ { - "name": "rna.test.t1", - "test_code": "Test.label \"Empty RNA sequence should be empty string\" <| Test.expect ((toRNA \"\") === (Some \"\"))" + "name": "Empty RNA sequence should be empty string", + "test_code": "Test.label.deprecated \"Empty RNA sequence should be empty string\" <| Test.expect ((toRNA \"\") === (Some \"\"))" }, { - "name": "rna.test.t2", - "test_code": "Test.label \"RNA complement of cytosine should be guanine\" <| Test.expect ((toRNA \"C\") === (Some \"G\"))" + "name": "RNA complement of cytosine should be guanine", + "test_code": "Test.label.deprecated \"RNA complement of cytosine should be guanine\" <| Test.expect ((toRNA \"C\") === (Some \"G\"))" }, { - "name": "rna.test.t3", - "test_code": "Test.label \"RNA complement of guanine should be cytosine\" <| Test.expect ((toRNA \"G\") === (Some \"C\"))" + "name": "RNA complement of guanine should be cytosine", + "test_code": "Test.label.deprecated \"RNA complement of guanine should be cytosine\" <| Test.expect ((toRNA \"G\") === (Some \"C\"))" }, { - "name": "rna.test.t4", - "test_code": "Test.label \"RNA complement of thymine should be adenine\" <| Test.expect ((toRNA \"T\") === (Some \"A\"))" + "name": "RNA complement of thymine should be adenine", + "test_code": "Test.label.deprecated \"RNA complement of thymine should be adenine\" <| Test.expect ((toRNA \"T\") === (Some \"A\"))" }, { - "name": "rna.test.t5", - "test_code": "Test.label \"RNA complement of adenine should be uracil\" <| Test.expect ((toRNA \"A\") === (Some \"U\"))" + "name": "RNA complement of adenine should be uracil", + "test_code": "Test.label.deprecated \"RNA complement of adenine should be uracil\" <| Test.expect ((toRNA \"A\") === (Some \"U\"))" }, { - "name": "rna.test.t6", - "test_code": "Test.label \"RNA complement\" <| Test.expect (((toRNA \"ACGTGGTCTTAA\") === (Some \"UGCACCAGAAUU\")))" + "name": "RNA complement", + "test_code": "Test.label.deprecated \"RNA complement\" <| Test.expect (((toRNA \"ACGTGGTCTTAA\") === (Some \"UGCACCAGAAUU\")))" }, { - "name": "rna.test.t7", - "test_code": "Test.label \"RNA complement should handle invalid DNA input\" <| Test.expect ((toRNA \"ACGTXXXCTTAA\")===(None))" + "name": "RNA complement should handle invalid DNA input", + "test_code": "Test.label.deprecated \"RNA complement should handle invalid DNA input\" <| Test.expect ((toRNA \"ACGTXXXCTTAA\") === (None))" } -] +] \ No newline at end of file diff --git a/exercises/practice/rna-transcription/.meta/testLoader.md b/exercises/practice/rna-transcription/.meta/testLoader.md index 1e211a2..ebdfe61 100644 --- a/exercises/practice/rna-transcription/.meta/testLoader.md +++ b/exercises/practice/rna-transcription/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./rna.u -.> add -.> load ./rna.test.u -.> add -.> move.term rna.tests tests +scratch/main> load ./rna.u +scratch/main> add +scratch/main> load ./rna.test.u +scratch/main> add +scratch/main> move.term rna.tests tests ``` diff --git a/exercises/practice/rna-transcription/rna.test.u b/exercises/practice/rna-transcription/rna.test.u index 53e84b8..240b14d 100644 --- a/exercises/practice/rna-transcription/rna.test.u +++ b/exercises/practice/rna-transcription/rna.test.u @@ -1,23 +1,23 @@ rna.test.t1 = - Test.label "Empty RNA sequence should be empty string" <| Test.expect ((toRNA "") === (Some "")) + Test.label.deprecated "Empty RNA sequence should be empty string" <| Test.expect ((toRNA "") === (Some "")) rna.test.t2 = - Test.label "RNA complement of cytosine should be guanine" <| Test.expect ((toRNA "C") === (Some "G")) + Test.label.deprecated "RNA complement of cytosine should be guanine" <| Test.expect ((toRNA "C") === (Some "G")) rna.test.t3 = - Test.label "RNA complement of guanine should be cytosine" <| Test.expect ((toRNA "G") === (Some "C")) + Test.label.deprecated "RNA complement of guanine should be cytosine" <| Test.expect ((toRNA "G") === (Some "C")) rna.test.t4 = - Test.label "RNA complement of thymine should be adenine" <| Test.expect ((toRNA "T") === (Some "A")) + Test.label.deprecated "RNA complement of thymine should be adenine" <| Test.expect ((toRNA "T") === (Some "A")) rna.test.t5 = - Test.label "RNA complement of adenine should be uracil" <| Test.expect ((toRNA "A") === (Some "U")) + Test.label.deprecated "RNA complement of adenine should be uracil" <| Test.expect ((toRNA "A") === (Some "U")) rna.test.t6 = - Test.label "RNA complement" <| Test.expect (((toRNA "ACGTGGTCTTAA") === (Some "UGCACCAGAAUU"))) + Test.label.deprecated "RNA complement" <| Test.expect (((toRNA "ACGTGGTCTTAA") === (Some "UGCACCAGAAUU"))) rna.test.t7 = - Test.label "RNA complement should handle invalid DNA input" <| Test.expect ((toRNA "ACGTXXXCTTAA") === (None)) + Test.label.deprecated "RNA complement should handle invalid DNA input" <| Test.expect ((toRNA "ACGTXXXCTTAA") === (None)) test> rna.tests = runAll [ rna.test.t1, diff --git a/exercises/practice/roman-numerals/.meta/testAnnotation.json b/exercises/practice/roman-numerals/.meta/testAnnotation.json index 9ae0529..e129847 100644 --- a/exercises/practice/roman-numerals/.meta/testAnnotation.json +++ b/exercises/practice/roman-numerals/.meta/testAnnotation.json @@ -1,106 +1,106 @@ [ { - "test_code": "romanNumerals.test.ex1 = let\n Test.label \"1 is I\" <| Test.expect (toRoman 1 === \"I\")", - "name": "romanNumerals.test.ex1" + "name": "1 is I", + "test_code": "let\n Test.label.deprecated \"1 is I\" <| Test.expect (toRoman 1 === \"I\")" }, { - "test_code": "romanNumerals.test.ex2 = let\n Test.label \"2 is II\" <| Test.expect (toRoman 2 === \"II\")", - "name": "romanNumerals.test.ex2" + "name": "2 is II", + "test_code": "let\n Test.label.deprecated \"2 is II\" <| Test.expect (toRoman 2 === \"II\")" }, { - "test_code": "romanNumerals.test.ex3 = let\n Test.label \"3 is III\" <| Test.expect (toRoman 3 === \"III\")", - "name": "romanNumerals.test.ex3" + "name": "3 is III", + "test_code": "let\n Test.label.deprecated \"3 is III\" <| Test.expect (toRoman 3 === \"III\")" }, { - "test_code": "romanNumerals.test.ex4 = let\n Test.label \"4 is IV\" <| Test.expect (toRoman 4 === \"IV\")", - "name": "romanNumerals.test.ex4" + "name": "4 is IV", + "test_code": "let\n Test.label.deprecated \"4 is IV\" <| Test.expect (toRoman 4 === \"IV\")" }, { - "test_code": "romanNumerals.test.ex5 = let\n Test.label \"5 is V\" <| Test.expect (toRoman 5 === \"V\")", - "name": "romanNumerals.test.ex5" + "name": "5 is V", + "test_code": "let\n Test.label.deprecated \"5 is V\" <| Test.expect (toRoman 5 === \"V\")" }, { - "test_code": "romanNumerals.test.ex6 = let\n Test.label \"6 is VI\" <| Test.expect (toRoman 6 === \"VI\")", - "name": "romanNumerals.test.ex6" + "name": "6 is VI", + "test_code": "let\n Test.label.deprecated \"6 is VI\" <| Test.expect (toRoman 6 === \"VI\")" }, { - "test_code": "romanNumerals.test.ex7 = let\n Test.label \"9 is IX\" <| Test.expect (toRoman 9 === \"IX\")", - "name": "romanNumerals.test.ex7" + "name": "9 is IX", + "test_code": "let\n Test.label.deprecated \"9 is IX\" <| Test.expect (toRoman 9 === \"IX\")" }, { - "test_code": "romanNumerals.test.ex8 = let\n Test.label \"27 is XXVII\" <| Test.expect (toRoman 27 === \"XXVII\")", - "name": "romanNumerals.test.ex8" + "name": "27 is XXVII", + "test_code": "let\n Test.label.deprecated \"27 is XXVII\" <| Test.expect (toRoman 27 === \"XXVII\")" }, { - "test_code": "romanNumerals.test.ex9 = let\n Test.label \"48 is XLVIII\" <| Test.expect (toRoman 48 === \"XLVIII\")", - "name": "romanNumerals.test.ex9" + "name": "48 is XLVIII", + "test_code": "let\n Test.label.deprecated \"48 is XLVIII\" <| Test.expect (toRoman 48 === \"XLVIII\")" }, { - "test_code": "romanNumerals.test.ex10 = let\n Test.label \"49 is XLIX\" <| Test.expect (toRoman 49 === \"XLIX\")", - "name": "romanNumerals.test.ex10" + "name": "49 is XLIX", + "test_code": "let\n Test.label.deprecated \"49 is XLIX\" <| Test.expect (toRoman 49 === \"XLIX\")" }, { - "test_code": "romanNumerals.test.ex11 = let\n Test.label \"59 is LIX\" <| Test.expect (toRoman 59 === \"LIX\")", - "name": "romanNumerals.test.ex11" + "name": "59 is LIX", + "test_code": "let\n Test.label.deprecated \"59 is LIX\" <| Test.expect (toRoman 59 === \"LIX\")" }, { - "test_code": "romanNumerals.test.ex12 = let\n Test.label \"93 is XCIII\" <| Test.expect (toRoman 93 === \"XCIII\")", - "name": "romanNumerals.test.ex12" + "name": "93 is XCIII", + "test_code": "let\n Test.label.deprecated \"93 is XCIII\" <| Test.expect (toRoman 93 === \"XCIII\")" }, { - "test_code": "romanNumerals.test.ex13 = let\n Test.label \"141 is CXLI\" <| Test.expect (toRoman 141 === \"CXLI\")", - "name": "romanNumerals.test.ex13" + "name": "141 is CXLI", + "test_code": "let\n Test.label.deprecated \"141 is CXLI\" <| Test.expect (toRoman 141 === \"CXLI\")" }, { - "test_code": "romanNumerals.test.ex14 = let\n Test.label \"163 is CLXIII\" <| Test.expect (toRoman 163 === \"CLXIII\")", - "name": "romanNumerals.test.ex14" + "name": "163 is CLXIII", + "test_code": "let\n Test.label.deprecated \"163 is CLXIII\" <| Test.expect (toRoman 163 === \"CLXIII\")" }, { - "test_code": "romanNumerals.test.ex15 = let\n Test.label \"402 is CDII\" <| Test.expect (toRoman 402 === \"CDII\")", - "name": "romanNumerals.test.ex15" + "name": "402 is CDII", + "test_code": "let\n Test.label.deprecated \"402 is CDII\" <| Test.expect (toRoman 402 === \"CDII\")" }, { - "test_code": "romanNumerals.test.ex16 = let\n Test.label \"575 is DLXXV\" <| Test.expect (toRoman 575 === \"DLXXV\")", - "name": "romanNumerals.test.ex16" + "name": "575 is DLXXV", + "test_code": "let\n Test.label.deprecated \"575 is DLXXV\" <| Test.expect (toRoman 575 === \"DLXXV\")" }, { - "test_code": "romanNumerals.test.ex17 = let\n Test.label \"911 is CMXI\" <| Test.expect (toRoman 911 === \"CMXI\")", - "name": "romanNumerals.test.ex17" + "name": "911 is CMXI", + "test_code": "let\n Test.label.deprecated \"911 is CMXI\" <| Test.expect (toRoman 911 === \"CMXI\")" }, { - "test_code": "romanNumerals.test.ex18 = let\n Test.label \"1024 is MXXIV\" <| Test.expect (toRoman 1024 === \"MXXIV\")", - "name": "romanNumerals.test.ex18" + "name": "1024 is MXXIV", + "test_code": "let\n Test.label.deprecated \"1024 is MXXIV\" <| Test.expect (toRoman 1024 === \"MXXIV\")" }, { - "test_code": "romanNumerals.test.ex19 = let\n Test.label \"3000 is MMM\" <| Test.expect (toRoman 3000 === \"MMM\")", - "name": "romanNumerals.test.ex19" + "name": "3000 is MMM", + "test_code": "let\n Test.label.deprecated \"3000 is MMM\" <| Test.expect (toRoman 3000 === \"MMM\")" }, { - "test_code": "romanNumerals.test.ex20 = let\n Test.label \"16 is XVI\" <| Test.expect (toRoman 16 === \"XVI\")", - "name": "romanNumerals.test.ex20" + "name": "16 is XVI", + "test_code": "let\n Test.label.deprecated \"16 is XVI\" <| Test.expect (toRoman 16 === \"XVI\")" }, { - "test_code": "romanNumerals.test.ex21 = let\n Test.label \"66 is LXVI\" <| Test.expect (toRoman 66 === \"LXVI\")", - "name": "romanNumerals.test.ex21" + "name": "66 is LXVI", + "test_code": "let\n Test.label.deprecated \"66 is LXVI\" <| Test.expect (toRoman 66 === \"LXVI\")" }, { - "test_code": "romanNumerals.test.ex22 = let\n Test.label \"166 is CLXVI\" <| Test.expect (toRoman 166 === \"CLXVI\")", - "name": "romanNumerals.test.ex22" + "name": "166 is CLXVI", + "test_code": "let\n Test.label.deprecated \"166 is CLXVI\" <| Test.expect (toRoman 166 === \"CLXVI\")" }, { - "test_code": "romanNumerals.test.ex23 = let\n Test.label \"666 is DCLXVI\" <| Test.expect (toRoman 666 === \"DCLXVI\")", - "name": "romanNumerals.test.ex23" + "name": "666 is DCLXVI", + "test_code": "let\n Test.label.deprecated \"666 is DCLXVI\" <| Test.expect (toRoman 666 === \"DCLXVI\")" }, { - "test_code": "romanNumerals.test.ex24 = let\n Test.label \"1666 is MDCLXVI\" <| Test.expect (toRoman 1666 === \"MDCLXVI\")", - "name": "romanNumerals.test.ex24" + "name": "1666 is MDCLXVI", + "test_code": "let\n Test.label.deprecated \"1666 is MDCLXVI\" <| Test.expect (toRoman 1666 === \"MDCLXVI\")" }, { - "test_code": "romanNumerals.test.ex25 = let\n Test.label \"3001 is MMMI\" <| Test.expect (toRoman 3001 === \"MMMI\")", - "name": "romanNumerals.test.ex25" + "name": "3001 is MMMI", + "test_code": "let\n Test.label.deprecated \"3001 is MMMI\" <| Test.expect (toRoman 3001 === \"MMMI\")" }, { - "test_code": "romanNumerals.test.ex26 = let\n Test.label \"3999 is MMMCMXCIX\" <| Test.expect (toRoman 3999 === \"MMMCMXCIX\")", - "name": "romanNumerals.test.ex26" + "name": "3999 is MMMCMXCIX", + "test_code": "let\n Test.label.deprecated \"3999 is MMMCMXCIX\" <| Test.expect (toRoman 3999 === \"MMMCMXCIX\")" } -] +] \ No newline at end of file diff --git a/exercises/practice/roman-numerals/.meta/testLoader.md b/exercises/practice/roman-numerals/.meta/testLoader.md index 01d2e3d..f53b395 100644 --- a/exercises/practice/roman-numerals/.meta/testLoader.md +++ b/exercises/practice/roman-numerals/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for roman-numerals exercise ```ucm -.> load ./romanNumerals.u -.> add -.> load ./romanNumerals.test.u -.> add -.> move.term romanNumerals.tests tests +scratch/main> load ./romanNumerals.u +scratch/main> add +scratch/main> load ./romanNumerals.test.u +scratch/main> add +scratch/main> move.term romanNumerals.tests tests ``` diff --git a/exercises/practice/roman-numerals/romanNumerals.test.u b/exercises/practice/roman-numerals/romanNumerals.test.u index 6ed7316..264e25a 100644 --- a/exercises/practice/roman-numerals/romanNumerals.test.u +++ b/exercises/practice/roman-numerals/romanNumerals.test.u @@ -1,80 +1,80 @@ romanNumerals.test.ex1 = let - Test.label "1 is I" <| Test.expect (toRoman 1 === "I") + Test.label.deprecated "1 is I" <| Test.expect (toRoman 1 === "I") romanNumerals.test.ex2 = let - Test.label "2 is II" <| Test.expect (toRoman 2 === "II") + Test.label.deprecated "2 is II" <| Test.expect (toRoman 2 === "II") romanNumerals.test.ex3 = let - Test.label "3 is III" <| Test.expect (toRoman 3 === "III") + Test.label.deprecated "3 is III" <| Test.expect (toRoman 3 === "III") romanNumerals.test.ex4 = let - Test.label "4 is IV" <| Test.expect (toRoman 4 === "IV") + Test.label.deprecated "4 is IV" <| Test.expect (toRoman 4 === "IV") romanNumerals.test.ex5 = let - Test.label "5 is V" <| Test.expect (toRoman 5 === "V") + Test.label.deprecated "5 is V" <| Test.expect (toRoman 5 === "V") romanNumerals.test.ex6 = let - Test.label "6 is VI" <| Test.expect (toRoman 6 === "VI") + Test.label.deprecated "6 is VI" <| Test.expect (toRoman 6 === "VI") romanNumerals.test.ex7 = let - Test.label "9 is IX" <| Test.expect (toRoman 9 === "IX") + Test.label.deprecated "9 is IX" <| Test.expect (toRoman 9 === "IX") romanNumerals.test.ex8 = let - Test.label "27 is XXVII" <| Test.expect (toRoman 27 === "XXVII") + Test.label.deprecated "27 is XXVII" <| Test.expect (toRoman 27 === "XXVII") romanNumerals.test.ex9 = let - Test.label "48 is XLVIII" <| Test.expect (toRoman 48 === "XLVIII") + Test.label.deprecated "48 is XLVIII" <| Test.expect (toRoman 48 === "XLVIII") romanNumerals.test.ex10 = let - Test.label "49 is XLIX" <| Test.expect (toRoman 49 === "XLIX") + Test.label.deprecated "49 is XLIX" <| Test.expect (toRoman 49 === "XLIX") romanNumerals.test.ex11 = let - Test.label "59 is LIX" <| Test.expect (toRoman 59 === "LIX") + Test.label.deprecated "59 is LIX" <| Test.expect (toRoman 59 === "LIX") romanNumerals.test.ex12 = let - Test.label "93 is XCIII" <| Test.expect (toRoman 93 === "XCIII") + Test.label.deprecated "93 is XCIII" <| Test.expect (toRoman 93 === "XCIII") romanNumerals.test.ex13 = let - Test.label "141 is CXLI" <| Test.expect (toRoman 141 === "CXLI") + Test.label.deprecated "141 is CXLI" <| Test.expect (toRoman 141 === "CXLI") romanNumerals.test.ex14 = let - Test.label "163 is CLXIII" <| Test.expect (toRoman 163 === "CLXIII") + Test.label.deprecated "163 is CLXIII" <| Test.expect (toRoman 163 === "CLXIII") romanNumerals.test.ex15 = let - Test.label "402 is CDII" <| Test.expect (toRoman 402 === "CDII") + Test.label.deprecated "402 is CDII" <| Test.expect (toRoman 402 === "CDII") romanNumerals.test.ex16 = let - Test.label "575 is DLXXV" <| Test.expect (toRoman 575 === "DLXXV") + Test.label.deprecated "575 is DLXXV" <| Test.expect (toRoman 575 === "DLXXV") romanNumerals.test.ex17 = let - Test.label "911 is CMXI" <| Test.expect (toRoman 911 === "CMXI") + Test.label.deprecated "911 is CMXI" <| Test.expect (toRoman 911 === "CMXI") romanNumerals.test.ex18 = let - Test.label "1024 is MXXIV" <| Test.expect (toRoman 1024 === "MXXIV") + Test.label.deprecated "1024 is MXXIV" <| Test.expect (toRoman 1024 === "MXXIV") romanNumerals.test.ex19 = let - Test.label "3000 is MMM" <| Test.expect (toRoman 3000 === "MMM") + Test.label.deprecated "3000 is MMM" <| Test.expect (toRoman 3000 === "MMM") romanNumerals.test.ex20 = let - Test.label "16 is XVI" <| Test.expect (toRoman 16 === "XVI") + Test.label.deprecated "16 is XVI" <| Test.expect (toRoman 16 === "XVI") romanNumerals.test.ex21 = let - Test.label "66 is LXVI" <| Test.expect (toRoman 66 === "LXVI") + Test.label.deprecated "66 is LXVI" <| Test.expect (toRoman 66 === "LXVI") romanNumerals.test.ex22 = let - Test.label "166 is CLXVI" <| Test.expect (toRoman 166 === "CLXVI") + Test.label.deprecated "166 is CLXVI" <| Test.expect (toRoman 166 === "CLXVI") romanNumerals.test.ex23 = let - Test.label "666 is DCLXVI" <| Test.expect (toRoman 666 === "DCLXVI") + Test.label.deprecated "666 is DCLXVI" <| Test.expect (toRoman 666 === "DCLXVI") romanNumerals.test.ex24 = let - Test.label "1666 is MDCLXVI" <| Test.expect (toRoman 1666 === "MDCLXVI") + Test.label.deprecated "1666 is MDCLXVI" <| Test.expect (toRoman 1666 === "MDCLXVI") romanNumerals.test.ex25 = let - Test.label "3001 is MMMI" <| Test.expect (toRoman 3001 === "MMMI") + Test.label.deprecated "3001 is MMMI" <| Test.expect (toRoman 3001 === "MMMI") romanNumerals.test.ex26 = let - Test.label "3999 is MMMCMXCIX" <| Test.expect (toRoman 3999 === "MMMCMXCIX") + Test.label.deprecated "3999 is MMMCMXCIX" <| Test.expect (toRoman 3999 === "MMMCMXCIX") test> romanNumerals.tests = runAll [ romanNumerals.test.ex1, diff --git a/exercises/practice/rotational-cipher/.meta/testAnnotation.json b/exercises/practice/rotational-cipher/.meta/testAnnotation.json index cfb26a8..8d6669b 100644 --- a/exercises/practice/rotational-cipher/.meta/testAnnotation.json +++ b/exercises/practice/rotational-cipher/.meta/testAnnotation.json @@ -1,42 +1,42 @@ [ { - "test_code": "rotationalCipher.test.ex1 = let\n\tTest.label \"rotate a by 0, same output as input\" <| Test.expect (rotate \"a\" 0 === \"a\")", - "name": "rotationalCipher.test.ex1" + "name": "rotate a by 0, same output as input", + "test_code": "let\n Test.label.deprecated \"rotate a by 0, same output as input\" <| Test.expect (rotate \"a\" 0 === \"a\")" }, { - "test_code": "rotationalCipher.test.ex2 = let\n\tTest.label \"rotate a by 1\" <| Test.expect (rotate \"a\" 1 === \"b\")", - "name": "rotationalCipher.test.ex2" + "name": "rotate a by 1", + "test_code": "let\n Test.label.deprecated \"rotate a by 1\" <| Test.expect (rotate \"a\" 1 === \"b\")" }, { - "test_code": "rotationalCipher.test.ex3 = let\n\tTest.label \"rotate a by 26, same output as input\" <| Test.expect (rotate \"a\" 26 === \"a\")", - "name": "rotationalCipher.test.ex3" + "name": "rotate a by 26, same output as input", + "test_code": "let\n Test.label.deprecated \"rotate a by 26, same output as input\" <| Test.expect (rotate \"a\" 26 === \"a\")" }, { - "test_code": "rotationalCipher.test.ex4 = let\n\tTest.label \"rotate m by 13\" <| Test.expect (rotate \"m\" 13 === \"z\")", - "name": "rotationalCipher.test.ex4" + "name": "rotate m by 13", + "test_code": "let\n Test.label.deprecated \"rotate m by 13\" <| Test.expect (rotate \"m\" 13 === \"z\")" }, { - "test_code": "rotationalCipher.test.ex5 = let\n\tTest.label \"rotate n by 13 with wrap around alphabet\" <| Test.expect (rotate \"n\" 13 === \"a\")", - "name": "rotationalCipher.test.ex5" + "name": "rotate n by 13 with wrap around alphabet", + "test_code": "let\n Test.label.deprecated \"rotate n by 13 with wrap around alphabet\" <| Test.expect (rotate \"n\" 13 === \"a\")" }, { - "test_code": "rotationalCipher.test.ex6 = let\n\tTest.label \"rotate capital letters\" <| Test.expect (rotate \"OMG\" 5 === \"TRL\")", - "name": "rotationalCipher.test.ex6" + "name": "rotate capital letters", + "test_code": "let\n Test.label.deprecated \"rotate capital letters\" <| Test.expect (rotate \"OMG\" 5 === \"TRL\")" }, { - "test_code": "rotationalCipher.test.ex7 = let\n\tTest.label \"rotate spaces\" <| Test.expect (rotate \"O M G\" 5 === \"T R L\")", - "name": "rotationalCipher.test.ex7" + "name": "rotate spaces", + "test_code": "let\n Test.label.deprecated \"rotate spaces\" <| Test.expect (rotate \"O M G\" 5 === \"T R L\")" }, { - "test_code": "rotationalCipher.test.ex8 = let\n\tTest.label \"rotate numbers\" <| Test.expect (rotate \"Testing 1 2 3 testing\" 4 === \"Xiwxmrk 1 2 3 xiwxmrk\")", - "name": "rotationalCipher.test.ex8" + "name": "rotate numbers", + "test_code": "let\n Test.label.deprecated \"rotate numbers\" <| Test.expect (rotate \"Testing 1 2 3 testing\" 4 === \"Xiwxmrk 1 2 3 xiwxmrk\")" }, { - "test_code": "rotationalCipher.test.ex9 = let\n\tTest.label \"rotate punctuation\" <| Test.expect (rotate \"Let's eat, Grandma!\" 21 === \"Gzo'n zvo, Bmviyhv!\")", - "name": "rotationalCipher.test.ex9" + "name": "rotate punctuation", + "test_code": "let\n Test.label.deprecated \"rotate punctuation\" <| Test.expect (rotate \"Let's eat, Grandma!\" 21 === \"Gzo'n zvo, Bmviyhv!\")" }, { - "test_code": "rotationalCipher.test.ex10 = let\n\tTest.label \"rotate all letters\" <| Test.expect (rotate \"The quick brown fox jumps over the lazy dog.\" 13 === \"Gur dhvpx oebja sbk whzcf bire gur ynml qbt.\")", - "name": "rotationalCipher.test.ex10" + "name": "rotate all letters", + "test_code": "let\n Test.label.deprecated \"rotate all letters\" <| Test.expect (rotate \"The quick brown fox jumps over the lazy dog.\" 13 === \"Gur dhvpx oebja sbk whzcf bire gur ynml qbt.\")" } ] \ No newline at end of file diff --git a/exercises/practice/rotational-cipher/.meta/testLoader.md b/exercises/practice/rotational-cipher/.meta/testLoader.md index 7f587f1..a93dcb0 100644 --- a/exercises/practice/rotational-cipher/.meta/testLoader.md +++ b/exercises/practice/rotational-cipher/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./rotationalCipher.u -.> add -.> load ./rotationalCipher.test.u -.> add -.> move.term rotationalCipher.tests tests +scratch/main> load ./rotationalCipher.u +scratch/main> add +scratch/main> load ./rotationalCipher.test.u +scratch/main> add +scratch/main> move.term rotationalCipher.tests tests ``` diff --git a/exercises/practice/rotational-cipher/rotationalCipher.test.u b/exercises/practice/rotational-cipher/rotationalCipher.test.u index 27ec156..cf5e815 100644 --- a/exercises/practice/rotational-cipher/rotationalCipher.test.u +++ b/exercises/practice/rotational-cipher/rotationalCipher.test.u @@ -1,32 +1,32 @@ rotationalCipher.test.ex1 = let - Test.label "rotate a by 0, same output as input" <| Test.expect (rotate "a" 0 === "a") + Test.label.deprecated "rotate a by 0, same output as input" <| Test.expect (rotate "a" 0 === "a") rotationalCipher.test.ex2 = let - Test.label "rotate a by 1" <| Test.expect (rotate "a" 1 === "b") + Test.label.deprecated "rotate a by 1" <| Test.expect (rotate "a" 1 === "b") rotationalCipher.test.ex3 = let - Test.label "rotate a by 26, same output as input" <| Test.expect (rotate "a" 26 === "a") + Test.label.deprecated "rotate a by 26, same output as input" <| Test.expect (rotate "a" 26 === "a") rotationalCipher.test.ex4 = let - Test.label "rotate m by 13" <| Test.expect (rotate "m" 13 === "z") + Test.label.deprecated "rotate m by 13" <| Test.expect (rotate "m" 13 === "z") rotationalCipher.test.ex5 = let - Test.label "rotate n by 13 with wrap around alphabet" <| Test.expect (rotate "n" 13 === "a") + Test.label.deprecated "rotate n by 13 with wrap around alphabet" <| Test.expect (rotate "n" 13 === "a") rotationalCipher.test.ex6 = let - Test.label "rotate capital letters" <| Test.expect (rotate "OMG" 5 === "TRL") + Test.label.deprecated "rotate capital letters" <| Test.expect (rotate "OMG" 5 === "TRL") rotationalCipher.test.ex7 = let - Test.label "rotate spaces" <| Test.expect (rotate "O M G" 5 === "T R L") + Test.label.deprecated "rotate spaces" <| Test.expect (rotate "O M G" 5 === "T R L") rotationalCipher.test.ex8 = let - Test.label "rotate numbers" <| Test.expect (rotate "Testing 1 2 3 testing" 4 === "Xiwxmrk 1 2 3 xiwxmrk") + Test.label.deprecated "rotate numbers" <| Test.expect (rotate "Testing 1 2 3 testing" 4 === "Xiwxmrk 1 2 3 xiwxmrk") rotationalCipher.test.ex9 = let - Test.label "rotate punctuation" <| Test.expect (rotate "Let's eat, Grandma!" 21 === "Gzo'n zvo, Bmviyhv!") + Test.label.deprecated "rotate punctuation" <| Test.expect (rotate "Let's eat, Grandma!" 21 === "Gzo'n zvo, Bmviyhv!") rotationalCipher.test.ex10 = let - Test.label "rotate all letters" <| Test.expect (rotate "The quick brown fox jumps over the lazy dog." 13 === "Gur dhvpx oebja sbk whzcf bire gur ynml qbt.") + Test.label.deprecated "rotate all letters" <| Test.expect (rotate "The quick brown fox jumps over the lazy dog." 13 === "Gur dhvpx oebja sbk whzcf bire gur ynml qbt.") test> rotationalCipher.tests = runAll [ rotationalCipher.test.ex1, diff --git a/exercises/practice/run-length-encoding/.meta/testAnnotation.json b/exercises/practice/run-length-encoding/.meta/testAnnotation.json index d0f0a3c..4565c4c 100644 --- a/exercises/practice/run-length-encoding/.meta/testAnnotation.json +++ b/exercises/practice/run-length-encoding/.meta/testAnnotation.json @@ -1,54 +1,54 @@ [ { - "test_code": "runLengthEncoding.test.ex1 = let\n\tTest.label \"run-length encode a string, empty string\" <| Test.expect (encode \"\" === \"\")", - "name": "runLengthEncoding.test.ex1" + "name": "run-length encode a string, empty string", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, empty string\" <| Test.expect ((encode \"\") === \"\")" }, { - "test_code": "runLengthEncoding.test.ex2 = let\n\tTest.label \"run-length encode a string, single characters only are encoded without count\" <| Test.expect (encode \"XYZ\" === \"XYZ\")", - "name": "runLengthEncoding.test.ex2" + "name": "run-length encode a string, single characters only are encoded without count", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, single characters only are encoded without count\" <| Test.expect (encode \"XYZ\" === \"XYZ\")" }, { - "test_code": "runLengthEncoding.test.ex3 = let\n\tTest.label \"run-length encode a string, string with no single characters\" <| Test.expect (encode \"AABBBCCCC\" === \"2A3B4C\")", - "name": "runLengthEncoding.test.ex3" + "name": "run-length encode a string, string with no single characters", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, string with no single characters\" <| Test.expect (encode \"AABBBCCCC\" === \"2A3B4C\")" }, { - "test_code": "runLengthEncoding.test.ex4 = let\n\tTest.label \"run-length encode a string, single characters mixed with repeated characters\" <| Test.expect (encode \"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB\" === \"12WB12W3B24WB\")", - "name": "runLengthEncoding.test.ex4" + "name": "run-length encode a string, single characters mixed with repeated characters", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, single characters mixed with repeated characters\" <| Test.expect (encode \"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB\" === \"12WB12W3B24WB\")" }, { - "test_code": "runLengthEncoding.test.ex5 = let\n\tTest.label \"run-length encode a string, multiple whitespace mixed in string\" <| Test.expect (encode \" hsqq qww \" === \"2 hs2q q2w2 \")", - "name": "runLengthEncoding.test.ex5" + "name": "run-length encode a string, multiple whitespace mixed in string", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, multiple whitespace mixed in string\" <| Test.expect (encode \" hsqq qww \" === \"2 hs2q q2w2 \")" }, { - "test_code": "runLengthEncoding.test.ex6 = let\n\tTest.label \"run-length encode a string, lowercase characters\" <| Test.expect (encode \"aabbbcccc\" === \"2a3b4c\")", - "name": "runLengthEncoding.test.ex6" + "name": "run-length encode a string, lowercase characters", + "test_code": "let\n Test.label.deprecated \"run-length encode a string, lowercase characters\" <| Test.expect (encode \"aabbbcccc\" === \"2a3b4c\")" }, { - "test_code": "runLengthEncoding.test.ex7 = let\n\tTest.label \"run-length decode a string, empty string\" <| Test.expect (decode \"\" === \"\")", - "name": "runLengthEncoding.test.ex7" + "name": "run-length decode a string, empty string", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, empty string\" <| Test.expect (decode \"\" === \"\")" }, { - "test_code": "runLengthEncoding.test.ex8 = let\n\tTest.label \"run-length decode a string, single characters only\" <| Test.expect (decode \"XYZ\" === \"XYZ\")", - "name": "runLengthEncoding.test.ex8" + "name": "run-length decode a string, single characters only", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, single characters only\" <| Test.expect (decode \"XYZ\" === \"XYZ\")" }, { - "test_code": "runLengthEncoding.test.ex9 = let\n\tTest.label \"run-length decode a string, string with no single characters\" <| Test.expect (decode \"2A3B4C\" === \"AABBBCCCC\")", - "name": "runLengthEncoding.test.ex9" + "name": "run-length decode a string, string with no single characters", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, string with no single characters\" <| Test.expect (decode \"2A3B4C\" === \"AABBBCCCC\")" }, { - "test_code": "runLengthEncoding.test.ex10 = let\n\tTest.label \"run-length decode a string, single characters with repeated characters\" <| Test.expect (decode \"12WB12W3B24WB\" === \"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB\")", - "name": "runLengthEncoding.test.ex10" + "name": "run-length decode a string, single characters with repeated characters", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, single characters with repeated characters\" <| Test.expect (decode \"12WB12W3B24WB\" === \"WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB\")" }, { - "test_code": "runLengthEncoding.test.ex11 = let\n\tTest.label \"run-length decode a string, multiple whitespace mixed in string\" <| Test.expect (decode \"2 hs2q q2w2 \" === \" hsqq qww \")", - "name": "runLengthEncoding.test.ex11" + "name": "run-length decode a string, multiple whitespace mixed in string", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, multiple whitespace mixed in string\" <| Test.expect (decode \"2 hs2q q2w2 \" === \" hsqq qww \")" }, { - "test_code": "runLengthEncoding.test.ex12 = let\n\tTest.label \"run-length decode a string, lowercase string\" <| Test.expect (decode \"2a3b4c\" === \"aabbbcccc\")", - "name": "runLengthEncoding.test.ex12" + "name": "run-length decode a string, lowercase string", + "test_code": "let\n Test.label.deprecated \"run-length decode a string, lowercase string\" <| Test.expect (decode \"2a3b4c\" === \"aabbbcccc\")" }, { - "test_code": "runLengthEncoding.test.ex13 = let\n\tTest.label \"encode and then decode, encode followed by decode gives original string\" <| Test.expect (consistency \"zzz ZZ zZ\" === \"zzz ZZ zZ\")", - "name": "runLengthEncoding.test.ex13" + "name": "encode and then decode, encode followed by decode gives original string", + "test_code": "let\n Test.label.deprecated \"encode and then decode, encode followed by decode gives original string\" <| Test.expect (consistency \"zzz ZZ zZ\" === \"zzz ZZ zZ\")" } -] +] \ No newline at end of file diff --git a/exercises/practice/run-length-encoding/.meta/testLoader.md b/exercises/practice/run-length-encoding/.meta/testLoader.md index a3f57ed..06bfc27 100644 --- a/exercises/practice/run-length-encoding/.meta/testLoader.md +++ b/exercises/practice/run-length-encoding/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./runLength.u -.> add -.> load ./runLength.test.u -.> add -.> move.term runLengthEncoding.tests tests +scratch/main> load ./runLength.u +scratch/main> add +scratch/main> load ./runLength.test.u +scratch/main> add +scratch/main> move.term runLengthEncoding.tests tests ``` diff --git a/exercises/practice/run-length-encoding/runLength.test.u b/exercises/practice/run-length-encoding/runLength.test.u index bd22587..4c060ff 100644 --- a/exercises/practice/run-length-encoding/runLength.test.u +++ b/exercises/practice/run-length-encoding/runLength.test.u @@ -1,44 +1,44 @@ runLengthEncoding.test.ex1 = let - Test.label "run-length encode a string, empty string" <| Test.expect ((encode "") === "") + Test.label.deprecated "run-length encode a string, empty string" <| Test.expect ((encode "") === "") runLengthEncoding.test.ex2 = let - Test.label "run-length encode a string, single characters only are encoded without count" <| Test.expect (encode "XYZ" === "XYZ") + Test.label.deprecated "run-length encode a string, single characters only are encoded without count" <| Test.expect (encode "XYZ" === "XYZ") runLengthEncoding.test.ex3 = let - Test.label "run-length encode a string, string with no single characters" <| Test.expect (encode "AABBBCCCC" === "2A3B4C") + Test.label.deprecated "run-length encode a string, string with no single characters" <| Test.expect (encode "AABBBCCCC" === "2A3B4C") runLengthEncoding.test.ex4 = let - Test.label "run-length encode a string, single characters mixed with repeated characters" <| Test.expect (encode "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" === "12WB12W3B24WB") + Test.label.deprecated "run-length encode a string, single characters mixed with repeated characters" <| Test.expect (encode "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB" === "12WB12W3B24WB") runLengthEncoding.test.ex5 = let - Test.label "run-length encode a string, multiple whitespace mixed in string" <| Test.expect (encode " hsqq qww " === "2 hs2q q2w2 ") + Test.label.deprecated "run-length encode a string, multiple whitespace mixed in string" <| Test.expect (encode " hsqq qww " === "2 hs2q q2w2 ") runLengthEncoding.test.ex6 = let - Test.label "run-length encode a string, lowercase characters" <| Test.expect (encode "aabbbcccc" === "2a3b4c") + Test.label.deprecated "run-length encode a string, lowercase characters" <| Test.expect (encode "aabbbcccc" === "2a3b4c") runLengthEncoding.test.ex7 = let - Test.label "run-length decode a string, empty string" <| Test.expect (decode "" === "") + Test.label.deprecated "run-length decode a string, empty string" <| Test.expect (decode "" === "") runLengthEncoding.test.ex8 = let - Test.label "run-length decode a string, single characters only" <| Test.expect (decode "XYZ" === "XYZ") + Test.label.deprecated "run-length decode a string, single characters only" <| Test.expect (decode "XYZ" === "XYZ") runLengthEncoding.test.ex9 = let - Test.label "run-length decode a string, string with no single characters" <| Test.expect (decode "2A3B4C" === "AABBBCCCC") + Test.label.deprecated "run-length decode a string, string with no single characters" <| Test.expect (decode "2A3B4C" === "AABBBCCCC") runLengthEncoding.test.ex10 = let - Test.label "run-length decode a string, single characters with repeated characters" <| Test.expect (decode "12WB12W3B24WB" === "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB") + Test.label.deprecated "run-length decode a string, single characters with repeated characters" <| Test.expect (decode "12WB12W3B24WB" === "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB") runLengthEncoding.test.ex11 = let - Test.label "run-length decode a string, multiple whitespace mixed in string" <| Test.expect (decode "2 hs2q q2w2 " === " hsqq qww ") + Test.label.deprecated "run-length decode a string, multiple whitespace mixed in string" <| Test.expect (decode "2 hs2q q2w2 " === " hsqq qww ") runLengthEncoding.test.ex12 = let - Test.label "run-length decode a string, lowercase string" <| Test.expect (decode "2a3b4c" === "aabbbcccc") + Test.label.deprecated "run-length decode a string, lowercase string" <| Test.expect (decode "2a3b4c" === "aabbbcccc") runLengthEncoding.consistency : Text -> Text runLengthEncoding.consistency = encode >> decode runLengthEncoding.test.ex13 = let - Test.label "encode and then decode, encode followed by decode gives original string" <| Test.expect (consistency "zzz ZZ zZ" === "zzz ZZ zZ") + Test.label.deprecated "encode and then decode, encode followed by decode gives original string" <| Test.expect (consistency "zzz ZZ zZ" === "zzz ZZ zZ") test> runLengthEncoding.tests = runAll [ runLengthEncoding.test.ex1, diff --git a/exercises/practice/scale-generator/.meta/examples/scaleGenerator.example.u b/exercises/practice/scale-generator/.meta/examples/scaleGenerator.example.u index 711c65a..9975f75 100644 --- a/exercises/practice/scale-generator/.meta/examples/scaleGenerator.example.u +++ b/exercises/practice/scale-generator/.meta/examples/scaleGenerator.example.u @@ -7,12 +7,12 @@ chromatic : Text -> [Text] chromatic tonic = normalizedTonic = normalize tonic if List.contains tonic flatKeys then - maybeI = Search.indexOf normalizedTonic flatChromaticScale + maybeI = firstIndexOf normalizedTonic flatChromaticScale maybeTup = Optional.map (i -> List.splitAt i flatChromaticScale) maybeI maybeScale = Optional.map (cases (newSuffix, newPrefix) -> newPrefix List.++ newSuffix) maybeTup Optional.getOrElse [] maybeScale else - maybeI = Search.indexOf normalizedTonic chromaticScale + maybeI = firstIndexOf normalizedTonic chromaticScale maybeTup = Optional.map (i -> List.splitAt i chromaticScale) maybeI maybeScale = Optional.map (cases (newSuffix, newPrefix) -> newPrefix List.++ newSuffix) maybeTup Optional.getOrElse [] maybeScale @@ -27,7 +27,7 @@ patternToSteps = cases mkPattern : Text -> [Nat] mkPattern pattern = steps = toCharList pattern |> List.map patternToSteps - List.scanl (+) 0 steps |> toList + List.scanLeft (+) 0 steps |> toList indexAtWithRotation : Nat -> [a] -> a indexAtWithRotation n ls = diff --git a/exercises/practice/scale-generator/.meta/testAnnotation.json b/exercises/practice/scale-generator/.meta/testAnnotation.json index 615106c..d18245a 100644 --- a/exercises/practice/scale-generator/.meta/testAnnotation.json +++ b/exercises/practice/scale-generator/.meta/testAnnotation.json @@ -1,130 +1,130 @@ [ { - "test_code": "scaleGenerator.test.ex1 = let\n\tTest.label \"Chromatic scales, Chromatic scale with sharps\" <| Test.expect (chromatic \"C\" === [\"C\",\"C#\",\"D\",\"D#\",\"E\",\"F\",\"F#\",\"G\",\"G#\",\"A\",\"A#\",\"B\"])", - "name": "scaleGenerator.test.ex1" + "name": "Chromatic scales, Chromatic scale with sharps", + "test_code": "let\n Test.label.deprecated \"Chromatic scales, Chromatic scale with sharps\" <| Test.expect (chromatic \"C\" === [\"C\",\"C#\",\"D\",\"D#\",\"E\",\"F\",\"F#\",\"G\",\"G#\",\"A\",\"A#\",\"B\"])" }, { - "test_code": "scaleGenerator.test.ex2 = let\n\tTest.label \"Chromatic scales, Chromatic scale with flats\" <| Test.expect (chromatic \"F\" === [\"F\",\"Gb\",\"G\",\"Ab\",\"A\",\"Bb\",\"B\",\"C\",\"Db\",\"D\",\"Eb\",\"E\"])", - "name": "scaleGenerator.test.ex2" + "name": "Chromatic scales, Chromatic scale with flats", + "test_code": "let\n Test.label.deprecated \"Chromatic scales, Chromatic scale with flats\" <| Test.expect (chromatic \"F\" === [\"F\",\"Gb\",\"G\",\"Ab\",\"A\",\"Bb\",\"B\",\"C\",\"Db\",\"D\",\"Eb\",\"E\"])" }, { - "test_code": "scaleGenerator.test.ex3 = let\n\tTest.label \"Scales with specified intervals, Simple major scale\" <| Test.expect (interval \"C\", \"MMmMMMm\" === [\"C\",\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\"])", - "name": "scaleGenerator.test.ex3" + "name": "Scales with specified intervals, Simple major scale", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Simple major scale\" <| Test.expect (interval \"C\" \"MMmMMMm\" === [\"C\",\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\"])" }, { - "test_code": "scaleGenerator.test.ex4 = let\n\tTest.label \"Scales with specified intervals, Major scale with sharps\" <| Test.expect (interval \"G\", \"MMmMMMm\" === [\"G\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F#\",\"G\"])", - "name": "scaleGenerator.test.ex4" + "name": "Scales with specified intervals, Major scale with sharps", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Major scale with sharps\" <| Test.expect (interval \"G\" \"MMmMMMm\" === [\"G\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F#\",\"G\"])" }, { - "test_code": "scaleGenerator.test.ex5 = let\n\tTest.label \"Scales with specified intervals, Major scale with flats\" <| Test.expect (interval \"F\", \"MMmMMMm\" === [\"F\",\"G\",\"A\",\"Bb\",\"C\",\"D\",\"E\",\"F\"])", - "name": "scaleGenerator.test.ex5" + "name": "Scales with specified intervals, Major scale with flats", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Major scale with flats\" <| Test.expect (interval \"F\" \"MMmMMMm\" === [\"F\",\"G\",\"A\",\"Bb\",\"C\",\"D\",\"E\",\"F\"])" }, { - "test_code": "scaleGenerator.test.ex6 = let\n\tTest.label \"Scales with specified intervals, Minor scale with sharps\" <| Test.expect (interval \"f#\", \"MmMMmMM\" === [\"F#\",\"G#\",\"A\",\"B\",\"C#\",\"D\",\"E\",\"F#\"])", - "name": "scaleGenerator.test.ex6" + "name": "Scales with specified intervals, Minor scale with sharps", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Minor scale with sharps\" <| Test.expect (interval \"f#\" \"MmMMmMM\" === [\"F#\",\"G#\",\"A\",\"B\",\"C#\",\"D\",\"E\",\"F#\"])" }, { - "test_code": "scaleGenerator.test.ex7 = let\n\tTest.label \"Scales with specified intervals, Minor scale with flats\" <| Test.expect (interval \"bb\", \"MmMMmMM\" === [\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"Gb\",\"Ab\",\"Bb\"])", - "name": "scaleGenerator.test.ex7" + "name": "Scales with specified intervals, Minor scale with flats", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Minor scale with flats\" <| Test.expect (interval \"bb\" \"MmMMmMM\" === [\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"Gb\",\"Ab\",\"Bb\"])" }, { - "test_code": "scaleGenerator.test.ex8 = let\n\tTest.label \"Scales with specified intervals, Dorian mode\" <| Test.expect (interval \"d\", \"MmMMMmM\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\"])", - "name": "scaleGenerator.test.ex8" + "name": "Scales with specified intervals, Dorian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Dorian mode\" <| Test.expect (interval \"d\" \"MmMMMmM\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\"])" }, { - "test_code": "scaleGenerator.test.ex9 = let\n\tTest.label \"Scales with specified intervals, Mixolydian mode\" <| Test.expect (interval \"Eb\", \"MMmMMmM\" === [\"Eb\",\"F\",\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\"])", - "name": "scaleGenerator.test.ex9" + "name": "Scales with specified intervals, Mixolydian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Mixolydian mode\" <| Test.expect (interval \"Eb\" \"MMmMMmM\" === [\"Eb\",\"F\",\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\"])" }, { - "test_code": "scaleGenerator.test.ex10 = let\n\tTest.label \"Scales with specified intervals, Lydian mode\" <| Test.expect (interval \"a\", \"MMMmMMm\" === [\"A\",\"B\",\"C#\",\"D#\",\"E\",\"F#\",\"G#\",\"A\"])", - "name": "scaleGenerator.test.ex10" + "name": "Scales with specified intervals, Lydian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Lydian mode\" <| Test.expect (interval \"a\" \"MMMmMMm\" === [\"A\",\"B\",\"C#\",\"D#\",\"E\",\"F#\",\"G#\",\"A\"])" }, { - "test_code": "scaleGenerator.test.ex11 = let\n\tTest.label \"Scales with specified intervals, Phrygian mode\" <| Test.expect (interval \"e\", \"mMMMmMM\" === [\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\",\"E\"])", - "name": "scaleGenerator.test.ex11" + "name": "Scales with specified intervals, Phrygian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Phrygian mode\" <| Test.expect (interval \"e\" \"mMMMmMM\" === [\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\",\"E\"])" }, { - "test_code": "scaleGenerator.test.ex12 = let\n\tTest.label \"Scales with specified intervals, Locrian mode\" <| Test.expect (interval \"g\", \"mMMmMMM\" === [\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"G\"])", - "name": "scaleGenerator.test.ex12" + "name": "Scales with specified intervals, Locrian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Locrian mode\" <| Test.expect (interval \"g\" \"mMMmMMM\" === [\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"G\"])" }, { - "test_code": "scaleGenerator.test.ex13 = let\n\tTest.label \"Scales with specified intervals, Harmonic minor\" <| Test.expect (interval \"d\", \"MmMMmAm\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"Bb\",\"Db\",\"D\"])", - "name": "scaleGenerator.test.ex13" + "name": "Scales with specified intervals, Harmonic minor", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Harmonic minor\" <| Test.expect (interval \"d\" \"MmMMmAm\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"Bb\",\"Db\",\"D\"])" }, { - "test_code": "scaleGenerator.test.ex14 = let\n\tTest.label \"Scales with specified intervals, Octatonic\" <| Test.expect (interval \"C\", \"MmMmMmMm\" === [\"C\",\"D\",\"D#\",\"F\",\"F#\",\"G#\",\"A\",\"B\",\"C\"])", - "name": "scaleGenerator.test.ex14" + "name": "Scales with specified intervals, Octatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Octatonic\" <| Test.expect (interval \"C\" \"MmMmMmMm\" === [\"C\",\"D\",\"D#\",\"F\",\"F#\",\"G#\",\"A\",\"B\",\"C\"])" }, { - "test_code": "scaleGenerator.test.ex15 = let\n\tTest.label \"Scales with specified intervals, Hexatonic\" <| Test.expect (interval \"Db\", \"MMMMMM\" === [\"Db\",\"Eb\",\"F\",\"G\",\"A\",\"B\",\"Db\"])", - "name": "scaleGenerator.test.ex15" + "name": "Scales with specified intervals, Hexatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Hexatonic\" <| Test.expect (interval \"Db\" \"MMMMMM\" === [\"Db\",\"Eb\",\"F\",\"G\",\"A\",\"B\",\"Db\"])" }, { - "test_code": "scaleGenerator.test.ex16 = let\n\tTest.label \"Scales with specified intervals, Pentatonic\" <| Test.expect (interval \"A\", \"MMAMA\" === [\"A\",\"B\",\"C#\",\"E\",\"F#\",\"A\"])", - "name": "scaleGenerator.test.ex16" + "name": "Scales with specified intervals, Pentatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Pentatonic\" <| Test.expect (interval \"A\" \"MMAMA\" === [\"A\",\"B\",\"C#\",\"E\",\"F#\",\"A\"])" }, { - "test_code": "scaleGenerator.test.ex17 = let\n\tTest.label \"Scales with specified intervals, Enigmatic\" <| Test.expect (interval \"G\", \"mAMMMmm\" === [\"G\",\"G#\",\"B\",\"C#\",\"D#\",\"F\",\"F#\",\"G\"])", - "name": "scaleGenerator.test.ex17" + "name": "Scales with specified intervals, Enigmatic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Enigmatic\" <| Test.expect (interval \"G\" \"mAMMMmm\" === [\"G\",\"G#\",\"B\",\"C#\",\"D#\",\"F\",\"F#\",\"G\"])" }, { - "test_code": "scaleGenerator.test.ex18 = let\n\tTest.label \"Scales with specified intervals, Simple major scale\" <| Test.expect (interval \"C\", \"MMmMMMm\" === [\"C\",\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\"])", - "name": "scaleGenerator.test.ex18" + "name": "Scales with specified intervals, Simple major scale", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Simple major scale\" <| Test.expect (interval \"C\" \"MMmMMMm\" === [\"C\",\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\"])" }, { - "test_code": "scaleGenerator.test.ex19 = let\n\tTest.label \"Scales with specified intervals, Major scale with sharps\" <| Test.expect (interval \"G\", \"MMmMMMm\" === [\"G\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F#\",\"G\"])", - "name": "scaleGenerator.test.ex19" + "name": "Scales with specified intervals, Major scale with sharps", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Major scale with sharps\" <| Test.expect (interval \"G\" \"MMmMMMm\" === [\"G\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F#\",\"G\"])" }, { - "test_code": "scaleGenerator.test.ex20 = let\n\tTest.label \"Scales with specified intervals, Major scale with flats\" <| Test.expect (interval \"F\", \"MMmMMMm\" === [\"F\",\"G\",\"A\",\"Bb\",\"C\",\"D\",\"E\",\"F\"])", - "name": "scaleGenerator.test.ex20" + "name": "Scales with specified intervals, Major scale with flats", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Major scale with flats\" <| Test.expect (interval \"F\" \"MMmMMMm\" === [\"F\",\"G\",\"A\",\"Bb\",\"C\",\"D\",\"E\",\"F\"])" }, { - "test_code": "scaleGenerator.test.ex21 = let\n\tTest.label \"Scales with specified intervals, Minor scale with sharps\" <| Test.expect (interval \"f#\", \"MmMMmMM\" === [\"F#\",\"G#\",\"A\",\"B\",\"C#\",\"D\",\"E\",\"F#\"])", - "name": "scaleGenerator.test.ex21" + "name": "Scales with specified intervals, Minor scale with sharps", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Minor scale with sharps\" <| Test.expect (interval \"f#\" \"MmMMmMM\" === [\"F#\",\"G#\",\"A\",\"B\",\"C#\",\"D\",\"E\",\"F#\"])" }, { - "test_code": "scaleGenerator.test.ex22 = let\n\tTest.label \"Scales with specified intervals, Minor scale with flats\" <| Test.expect (interval \"bb\", \"MmMMmMM\" === [\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"Gb\",\"Ab\",\"Bb\"])", - "name": "scaleGenerator.test.ex22" + "name": "Scales with specified intervals, Minor scale with flats", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Minor scale with flats\" <| Test.expect (interval \"bb\" \"MmMMmMM\" === [\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"Gb\",\"Ab\",\"Bb\"])" }, { - "test_code": "scaleGenerator.test.ex23 = let\n\tTest.label \"Scales with specified intervals, Dorian mode\" <| Test.expect (interval \"d\", \"MmMMMmM\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\"])", - "name": "scaleGenerator.test.ex23" + "name": "Scales with specified intervals, Dorian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Dorian mode\" <| Test.expect (interval \"d\" \"MmMMMmM\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\"])" }, { - "test_code": "scaleGenerator.test.ex24 = let\n\tTest.label \"Scales with specified intervals, Mixolydian mode\" <| Test.expect (interval \"Eb\", \"MMmMMmM\" === [\"Eb\",\"F\",\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"C\",\"Eb\"])", - "name": "scaleGenerator.test.ex24" + "name": "Scales with specified intervals, Mixolydian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Mixolydian mode\" <| Test.expect (interval \"Eb\" \"MMmMMmM\" === [\"Eb\",\"F\",\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\"])" }, { - "test_code": "scaleGenerator.test.ex25 = let\n\tTest.label \"Scales with specified intervals, Lydian mode\" <| Test.expect (interval \"a\", \"MMMmMMm\" === [\"A\",\"B\",\"C#\",\"D#\",\"E\",\"F#\",\"G#\",\"A\"])", - "name": "scaleGenerator.test.ex25" + "name": "Scales with specified intervals, Lydian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Lydian mode\" <| Test.expect (interval \"a\" \"MMMmMMm\" === [\"A\",\"B\",\"C#\",\"D#\",\"E\",\"F#\",\"G#\",\"A\"])" }, { - "test_code": "scaleGenerator.test.ex26 = let\n\tTest.label \"Scales with specified intervals, Phrygian mode\" <| Test.expect (interval \"e\", \"mMMMmMM\" === [\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\",\"E\"])", - "name": "scaleGenerator.test.ex26" + "name": "Scales with specified intervals, Phrygian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Phrygian mode\" <| Test.expect (interval \"e\" \"mMMMmMM\" === [\"E\",\"F\",\"G\",\"A\",\"B\",\"C\",\"D\",\"E\"])" }, { - "test_code": "scaleGenerator.test.ex27 = let\n\tTest.label \"Scales with specified intervals, Locrian mode\" <| Test.expect (interval \"g\", \"mMMmMMM\" === [\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"G\"])", - "name": "scaleGenerator.test.ex27" + "name": "Scales with specified intervals, Locrian mode", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Locrian mode\" <| Test.expect (interval \"g\" \"mMMmMMM\" === [\"G\",\"Ab\",\"Bb\",\"C\",\"Db\",\"Eb\",\"F\",\"G\"])" }, { - "test_code": "scaleGenerator.test.ex28 = let\n\tTest.label \"Scales with specified intervals, Harmonic minor\" <| Test.expect (interval \"d\", \"MmMMmAm\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"Bb\",\"Db\",\"D\"])", - "name": "scaleGenerator.test.ex28" + "name": "Scales with specified intervals, Harmonic minor", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Harmonic minor\" <| Test.expect (interval \"d\" \"MmMMmAm\" === [\"D\",\"E\",\"F\",\"G\",\"A\",\"Bb\",\"Db\",\"D\"])" }, { - "test_code": "scaleGenerator.test.ex29 = let\n\tTest.label \"Scales with specified intervals, Octatonic\" <| Test.expect (interval \"C\", \"MmMmMmMm\" === [\"C\",\"D\",\"D#\",\"F\",\"F#\",\"G#\",\"A\",\"B\",\"C\"])", - "name": "scaleGenerator.test.ex29" + "name": "Scales with specified intervals, Octatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Octatonic\" <| Test.expect (interval \"C\" \"MmMmMmMm\" === [\"C\",\"D\",\"D#\",\"F\",\"F#\",\"G#\",\"A\",\"B\",\"C\"])" }, { - "test_code": "scaleGenerator.test.ex30 = let\n\tTest.label \"Scales with specified intervals, Hexatonic\" <| Test.expect (interval \"Db\", \"MMMMMM\" === [\"Db\",\"Eb\",\"F\",\"G\",\"A\",\"B\",\"Db\"])", - "name": "scaleGenerator.test.ex30" + "name": "Scales with specified intervals, Hexatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Hexatonic\" <| Test.expect (interval \"Db\" \"MMMMMM\" === [\"Db\",\"Eb\",\"F\",\"G\",\"A\",\"B\",\"Db\"])" }, { - "test_code": "scaleGenerator.test.ex31 = let\n\tTest.label \"Scales with specified intervals, Pentatonic\" <| Test.expect (interval \"A\", \"MMAMA\" === [\"A\",\"B\",\"C#\",\"E\",\"F#\",\"A\"])", - "name": "scaleGenerator.test.ex31" + "name": "Scales with specified intervals, Pentatonic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Pentatonic\" <| Test.expect (interval \"A\" \"MMAMA\" === [\"A\",\"B\",\"C#\",\"E\",\"F#\",\"A\"])" }, { - "test_code": "scaleGenerator.test.ex32 = let\n\tTest.label \"Scales with specified intervals, Enigmatic\" <| Test.expect (interval \"G\", \"mAMMMmm\" === [\"G\",\"G#\",\"B\",\"C#\",\"D#\",\"F\",\"F#\",\"G\"])", - "name": "scaleGenerator.test.ex32" + "name": "Scales with specified intervals, Enigmatic", + "test_code": "let\n Test.label.deprecated \"Scales with specified intervals, Enigmatic\" <| Test.expect (interval \"G\" \"mAMMMmm\" === [\"G\",\"G#\",\"B\",\"C#\",\"D#\",\"F\",\"F#\",\"G\"])" } -] +] \ No newline at end of file diff --git a/exercises/practice/scale-generator/.meta/testLoader.md b/exercises/practice/scale-generator/.meta/testLoader.md index 6c29445..5c6cda2 100644 --- a/exercises/practice/scale-generator/.meta/testLoader.md +++ b/exercises/practice/scale-generator/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./scaleGenerator.u -.> add -.> load ./scaleGenerator.test.u -.> add -.> move.term scaleGenerator.tests tests +scratch/main> load ./scaleGenerator.u +scratch/main> add +scratch/main> load ./scaleGenerator.test.u +scratch/main> add +scratch/main> move.term scaleGenerator.tests tests ``` diff --git a/exercises/practice/scale-generator/scaleGenerator.test.u b/exercises/practice/scale-generator/scaleGenerator.test.u index 3c64f85..cee1292 100644 --- a/exercises/practice/scale-generator/scaleGenerator.test.u +++ b/exercises/practice/scale-generator/scaleGenerator.test.u @@ -1,98 +1,98 @@ scaleGenerator.test.ex1 = let - Test.label "Chromatic scales, Chromatic scale with sharps" <| Test.expect (chromatic "C" === ["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"]) + Test.label.deprecated "Chromatic scales, Chromatic scale with sharps" <| Test.expect (chromatic "C" === ["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"]) scaleGenerator.test.ex2 = let - Test.label "Chromatic scales, Chromatic scale with flats" <| Test.expect (chromatic "F" === ["F","Gb","G","Ab","A","Bb","B","C","Db","D","Eb","E"]) + Test.label.deprecated "Chromatic scales, Chromatic scale with flats" <| Test.expect (chromatic "F" === ["F","Gb","G","Ab","A","Bb","B","C","Db","D","Eb","E"]) scaleGenerator.test.ex3 = let - Test.label "Scales with specified intervals, Simple major scale" <| Test.expect (interval "C" "MMmMMMm" === ["C","D","E","F","G","A","B","C"]) + Test.label.deprecated "Scales with specified intervals, Simple major scale" <| Test.expect (interval "C" "MMmMMMm" === ["C","D","E","F","G","A","B","C"]) scaleGenerator.test.ex4 = let - Test.label "Scales with specified intervals, Major scale with sharps" <| Test.expect (interval "G" "MMmMMMm" === ["G","A","B","C","D","E","F#","G"]) + Test.label.deprecated "Scales with specified intervals, Major scale with sharps" <| Test.expect (interval "G" "MMmMMMm" === ["G","A","B","C","D","E","F#","G"]) scaleGenerator.test.ex5 = let - Test.label "Scales with specified intervals, Major scale with flats" <| Test.expect (interval "F" "MMmMMMm" === ["F","G","A","Bb","C","D","E","F"]) + Test.label.deprecated "Scales with specified intervals, Major scale with flats" <| Test.expect (interval "F" "MMmMMMm" === ["F","G","A","Bb","C","D","E","F"]) scaleGenerator.test.ex6 = let - Test.label "Scales with specified intervals, Minor scale with sharps" <| Test.expect (interval "f#" "MmMMmMM" === ["F#","G#","A","B","C#","D","E","F#"]) + Test.label.deprecated "Scales with specified intervals, Minor scale with sharps" <| Test.expect (interval "f#" "MmMMmMM" === ["F#","G#","A","B","C#","D","E","F#"]) scaleGenerator.test.ex7 = let - Test.label "Scales with specified intervals, Minor scale with flats" <| Test.expect (interval "bb" "MmMMmMM" === ["Bb","C","Db","Eb","F","Gb","Ab","Bb"]) + Test.label.deprecated "Scales with specified intervals, Minor scale with flats" <| Test.expect (interval "bb" "MmMMmMM" === ["Bb","C","Db","Eb","F","Gb","Ab","Bb"]) scaleGenerator.test.ex8 = let - Test.label "Scales with specified intervals, Dorian mode" <| Test.expect (interval "d" "MmMMMmM" === ["D","E","F","G","A","B","C","D"]) + Test.label.deprecated "Scales with specified intervals, Dorian mode" <| Test.expect (interval "d" "MmMMMmM" === ["D","E","F","G","A","B","C","D"]) scaleGenerator.test.ex9 = let - Test.label "Scales with specified intervals, Mixolydian mode" <| Test.expect (interval "Eb" "MMmMMmM" === ["Eb","F","G","Ab","Bb","C","Db","Eb"]) + Test.label.deprecated "Scales with specified intervals, Mixolydian mode" <| Test.expect (interval "Eb" "MMmMMmM" === ["Eb","F","G","Ab","Bb","C","Db","Eb"]) scaleGenerator.test.ex10 = let - Test.label "Scales with specified intervals, Lydian mode" <| Test.expect (interval "a" "MMMmMMm" === ["A","B","C#","D#","E","F#","G#","A"]) + Test.label.deprecated "Scales with specified intervals, Lydian mode" <| Test.expect (interval "a" "MMMmMMm" === ["A","B","C#","D#","E","F#","G#","A"]) scaleGenerator.test.ex11 = let - Test.label "Scales with specified intervals, Phrygian mode" <| Test.expect (interval "e" "mMMMmMM" === ["E","F","G","A","B","C","D","E"]) + Test.label.deprecated "Scales with specified intervals, Phrygian mode" <| Test.expect (interval "e" "mMMMmMM" === ["E","F","G","A","B","C","D","E"]) scaleGenerator.test.ex12 = let - Test.label "Scales with specified intervals, Locrian mode" <| Test.expect (interval "g" "mMMmMMM" === ["G","Ab","Bb","C","Db","Eb","F","G"]) + Test.label.deprecated "Scales with specified intervals, Locrian mode" <| Test.expect (interval "g" "mMMmMMM" === ["G","Ab","Bb","C","Db","Eb","F","G"]) scaleGenerator.test.ex13 = let - Test.label "Scales with specified intervals, Harmonic minor" <| Test.expect (interval "d" "MmMMmAm" === ["D","E","F","G","A","Bb","Db","D"]) + Test.label.deprecated "Scales with specified intervals, Harmonic minor" <| Test.expect (interval "d" "MmMMmAm" === ["D","E","F","G","A","Bb","Db","D"]) scaleGenerator.test.ex14 = let - Test.label "Scales with specified intervals, Octatonic" <| Test.expect (interval "C" "MmMmMmMm" === ["C","D","D#","F","F#","G#","A","B","C"]) + Test.label.deprecated "Scales with specified intervals, Octatonic" <| Test.expect (interval "C" "MmMmMmMm" === ["C","D","D#","F","F#","G#","A","B","C"]) scaleGenerator.test.ex15 = let - Test.label "Scales with specified intervals, Hexatonic" <| Test.expect (interval "Db" "MMMMMM" === ["Db","Eb","F","G","A","B","Db"]) + Test.label.deprecated "Scales with specified intervals, Hexatonic" <| Test.expect (interval "Db" "MMMMMM" === ["Db","Eb","F","G","A","B","Db"]) scaleGenerator.test.ex16 = let - Test.label "Scales with specified intervals, Pentatonic" <| Test.expect (interval "A" "MMAMA" === ["A","B","C#","E","F#","A"]) + Test.label.deprecated "Scales with specified intervals, Pentatonic" <| Test.expect (interval "A" "MMAMA" === ["A","B","C#","E","F#","A"]) scaleGenerator.test.ex17 = let - Test.label "Scales with specified intervals, Enigmatic" <| Test.expect (interval "G" "mAMMMmm" === ["G","G#","B","C#","D#","F","F#","G"]) + Test.label.deprecated "Scales with specified intervals, Enigmatic" <| Test.expect (interval "G" "mAMMMmm" === ["G","G#","B","C#","D#","F","F#","G"]) scaleGenerator.test.ex18 = let - Test.label "Scales with specified intervals, Simple major scale" <| Test.expect (interval "C" "MMmMMMm" === ["C","D","E","F","G","A","B","C"]) + Test.label.deprecated "Scales with specified intervals, Simple major scale" <| Test.expect (interval "C" "MMmMMMm" === ["C","D","E","F","G","A","B","C"]) scaleGenerator.test.ex19 = let - Test.label "Scales with specified intervals, Major scale with sharps" <| Test.expect (interval "G" "MMmMMMm" === ["G","A","B","C","D","E","F#","G"]) + Test.label.deprecated "Scales with specified intervals, Major scale with sharps" <| Test.expect (interval "G" "MMmMMMm" === ["G","A","B","C","D","E","F#","G"]) scaleGenerator.test.ex20 = let - Test.label "Scales with specified intervals, Major scale with flats" <| Test.expect (interval "F" "MMmMMMm" === ["F","G","A","Bb","C","D","E","F"]) + Test.label.deprecated "Scales with specified intervals, Major scale with flats" <| Test.expect (interval "F" "MMmMMMm" === ["F","G","A","Bb","C","D","E","F"]) scaleGenerator.test.ex21 = let - Test.label "Scales with specified intervals, Minor scale with sharps" <| Test.expect (interval "f#" "MmMMmMM" === ["F#","G#","A","B","C#","D","E","F#"]) + Test.label.deprecated "Scales with specified intervals, Minor scale with sharps" <| Test.expect (interval "f#" "MmMMmMM" === ["F#","G#","A","B","C#","D","E","F#"]) scaleGenerator.test.ex22 = let - Test.label "Scales with specified intervals, Minor scale with flats" <| Test.expect (interval "bb" "MmMMmMM" === ["Bb","C","Db","Eb","F","Gb","Ab","Bb"]) + Test.label.deprecated "Scales with specified intervals, Minor scale with flats" <| Test.expect (interval "bb" "MmMMmMM" === ["Bb","C","Db","Eb","F","Gb","Ab","Bb"]) scaleGenerator.test.ex23 = let - Test.label "Scales with specified intervals, Dorian mode" <| Test.expect (interval "d" "MmMMMmM" === ["D","E","F","G","A","B","C","D"]) + Test.label.deprecated "Scales with specified intervals, Dorian mode" <| Test.expect (interval "d" "MmMMMmM" === ["D","E","F","G","A","B","C","D"]) scaleGenerator.test.ex24 = let - Test.label "Scales with specified intervals, Mixolydian mode" <| Test.expect (interval "Eb" "MMmMMmM" === ["Eb","F","G","Ab","Bb","C","Db","Eb"]) + Test.label.deprecated "Scales with specified intervals, Mixolydian mode" <| Test.expect (interval "Eb" "MMmMMmM" === ["Eb","F","G","Ab","Bb","C","Db","Eb"]) scaleGenerator.test.ex25 = let - Test.label "Scales with specified intervals, Lydian mode" <| Test.expect (interval "a" "MMMmMMm" === ["A","B","C#","D#","E","F#","G#","A"]) + Test.label.deprecated "Scales with specified intervals, Lydian mode" <| Test.expect (interval "a" "MMMmMMm" === ["A","B","C#","D#","E","F#","G#","A"]) scaleGenerator.test.ex26 = let - Test.label "Scales with specified intervals, Phrygian mode" <| Test.expect (interval "e" "mMMMmMM" === ["E","F","G","A","B","C","D","E"]) + Test.label.deprecated "Scales with specified intervals, Phrygian mode" <| Test.expect (interval "e" "mMMMmMM" === ["E","F","G","A","B","C","D","E"]) scaleGenerator.test.ex27 = let - Test.label "Scales with specified intervals, Locrian mode" <| Test.expect (interval "g" "mMMmMMM" === ["G","Ab","Bb","C","Db","Eb","F","G"]) + Test.label.deprecated "Scales with specified intervals, Locrian mode" <| Test.expect (interval "g" "mMMmMMM" === ["G","Ab","Bb","C","Db","Eb","F","G"]) scaleGenerator.test.ex28 = let - Test.label "Scales with specified intervals, Harmonic minor" <| Test.expect (interval "d" "MmMMmAm" === ["D","E","F","G","A","Bb","Db","D"]) + Test.label.deprecated "Scales with specified intervals, Harmonic minor" <| Test.expect (interval "d" "MmMMmAm" === ["D","E","F","G","A","Bb","Db","D"]) scaleGenerator.test.ex29 = let - Test.label "Scales with specified intervals, Octatonic" <| Test.expect (interval "C" "MmMmMmMm" === ["C","D","D#","F","F#","G#","A","B","C"]) + Test.label.deprecated "Scales with specified intervals, Octatonic" <| Test.expect (interval "C" "MmMmMmMm" === ["C","D","D#","F","F#","G#","A","B","C"]) scaleGenerator.test.ex30 = let - Test.label "Scales with specified intervals, Hexatonic" <| Test.expect (interval "Db" "MMMMMM" === ["Db","Eb","F","G","A","B","Db"]) + Test.label.deprecated "Scales with specified intervals, Hexatonic" <| Test.expect (interval "Db" "MMMMMM" === ["Db","Eb","F","G","A","B","Db"]) scaleGenerator.test.ex31 = let - Test.label "Scales with specified intervals, Pentatonic" <| Test.expect (interval "A" "MMAMA" === ["A","B","C#","E","F#","A"]) + Test.label.deprecated "Scales with specified intervals, Pentatonic" <| Test.expect (interval "A" "MMAMA" === ["A","B","C#","E","F#","A"]) scaleGenerator.test.ex32 = let - Test.label "Scales with specified intervals, Enigmatic" <| Test.expect (interval "G" "mAMMMmm" === ["G","G#","B","C#","D#","F","F#","G"]) + Test.label.deprecated "Scales with specified intervals, Enigmatic" <| Test.expect (interval "G" "mAMMMmm" === ["G","G#","B","C#","D#","F","F#","G"]) test> scaleGenerator.tests = runAll [ scaleGenerator.test.ex1, diff --git a/exercises/practice/scrabble-score/.meta/testAnnotation.json b/exercises/practice/scrabble-score/.meta/testAnnotation.json index 1cb179a..87503e7 100644 --- a/exercises/practice/scrabble-score/.meta/testAnnotation.json +++ b/exercises/practice/scrabble-score/.meta/testAnnotation.json @@ -1,46 +1,46 @@ [ { - "name": "scrabbleScore.score.tests.ex1", - "test_code": "expect (1 == scrabbleScore.score \"a\")\n |> Test.label \"lowercase letter\"" + "name": "lowercase letter", + "test_code": "expect (1 == scrabbleScore.score \"a\")\n |> Test.label.deprecated \"lowercase letter\"" }, { - "name": "scrabbleScore.score.tests.ex2", - "test_code": "expect (1 == scrabbleScore.score \"A\")\n |> Test.label \"uppercase letter\"" + "name": "uppercase letter", + "test_code": "expect (1 == scrabbleScore.score \"A\")\n |> Test.label.deprecated \"uppercase letter\"" }, { - "name": "scrabbleScore.score.tests.ex3", - "test_code": "expect (4 == scrabbleScore.score \"f\")\n |> Test.label \"valuable letter\"" + "name": "valuable letter", + "test_code": "expect (4 == scrabbleScore.score \"f\")\n |> Test.label.deprecated \"valuable letter\"" }, { - "name": "scrabbleScore.score.tests.ex4", - "test_code": "expect (2 == scrabbleScore.score \"at\")\n |> Test.label \"short word\"" + "name": "short word", + "test_code": "expect (2 == scrabbleScore.score \"at\")\n |> Test.label.deprecated \"short word\"" }, { - "name": "scrabbleScore.score.tests.ex5", - "test_code": "expect (12 == scrabbleScore.score \"zoo\")\n |> Test.label \"short, valuable word\"" + "name": "short, valuable word", + "test_code": "expect (12 == scrabbleScore.score \"zoo\")\n |> Test.label.deprecated \"short, valuable word\"" }, { - "name": "scrabbleScore.score.tests.ex6", - "test_code": "expect (6 == scrabbleScore.score \"street\")\n |> Test.label \"medium word\"" + "name": "medium word", + "test_code": "expect (6 == scrabbleScore.score \"street\")\n |> Test.label.deprecated \"medium word\"" }, { - "name": "scrabbleScore.score.tests.ex7", - "test_code": "expect (22 == scrabbleScore.score \"quirky\")\n |> Test.label \"medium, valuable word\"" + "name": "medium, valuable word", + "test_code": "expect (22 == scrabbleScore.score \"quirky\")\n |> Test.label.deprecated \"medium, valuable word\"" }, { - "name": "scrabbleScore.score.tests.ex8", - "test_code": "expect (41 == scrabbleScore.score \"OxyphenButazone\")\n |> Test.label \"long, mixed-case word\"" + "name": "long, mixed-case word", + "test_code": "expect (41 == scrabbleScore.score \"OxyphenButazone\")\n |> Test.label.deprecated \"long, mixed-case word\"" }, { - "name": "scrabbleScore.score.tests.ex9", - "test_code": "expect (8 == scrabbleScore.score \"pinata\")\n |> Test.label \"english-like word\"" + "name": "english-like word", + "test_code": "expect (8 == scrabbleScore.score \"pinata\")\n |> Test.label.deprecated \"english-like word\"" }, { - "name": "scrabbleScore.score.tests.ex10", - "test_code": "expect (0 == scrabbleScore.score \"\")\n |> Test.label \"empty input\"" + "name": "empty input", + "test_code": "expect (0 == scrabbleScore.score \"\")\n |> Test.label.deprecated \"empty input\"" }, { - "name": "scrabbleScore.score.tests.ex11", - "test_code": "expect (87 == scrabbleScore.score \"abcdefghijklmnopqrstuvwxyz\")\n |> Test.label \"entire alphabet available\"" + "name": "entire alphabet available", + "test_code": "expect (87 == scrabbleScore.score \"abcdefghijklmnopqrstuvwxyz\")\n |> Test.label.deprecated \"entire alphabet available\"" } -] +] \ No newline at end of file diff --git a/exercises/practice/scrabble-score/.meta/testLoader.md b/exercises/practice/scrabble-score/.meta/testLoader.md index b879cff..ad12c55 100644 --- a/exercises/practice/scrabble-score/.meta/testLoader.md +++ b/exercises/practice/scrabble-score/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for scrabble-score exercise ```ucm -.> load ./scrabbleScore.u -.> add -.> load ./scrabbleScore.test.u -.> add -.> move.term scrabbleScore.tests tests +scratch/main> load ./scrabbleScore.u +scratch/main> add +scratch/main> load ./scrabbleScore.test.u +scratch/main> add +scratch/main> move.term scrabbleScore.tests tests ``` diff --git a/exercises/practice/scrabble-score/scrabbleScore.test.u b/exercises/practice/scrabble-score/scrabbleScore.test.u index 2779a23..f257204 100644 --- a/exercises/practice/scrabble-score/scrabbleScore.test.u +++ b/exercises/practice/scrabble-score/scrabbleScore.test.u @@ -1,46 +1,46 @@ scrabbleScore.score.tests.ex1 = expect (1 == scrabbleScore.score "a") - |> Test.label "lowercase letter" + |> Test.label.deprecated "lowercase letter" scrabbleScore.score.tests.ex2 = expect (1 == scrabbleScore.score "A") - |> Test.label "uppercase letter" + |> Test.label.deprecated "uppercase letter" scrabbleScore.score.tests.ex3 = expect (4 == scrabbleScore.score "f") - |> Test.label "valuable letter" + |> Test.label.deprecated "valuable letter" scrabbleScore.score.tests.ex4 = expect (2 == scrabbleScore.score "at") - |> Test.label "short word" + |> Test.label.deprecated "short word" scrabbleScore.score.tests.ex5 = expect (12 == scrabbleScore.score "zoo") - |> Test.label "short, valuable word" + |> Test.label.deprecated "short, valuable word" scrabbleScore.score.tests.ex6 = expect (6 == scrabbleScore.score "street") - |> Test.label "medium word" + |> Test.label.deprecated "medium word" scrabbleScore.score.tests.ex7 = expect (22 == scrabbleScore.score "quirky") - |> Test.label "medium, valuable word" + |> Test.label.deprecated "medium, valuable word" scrabbleScore.score.tests.ex8 = expect (41 == scrabbleScore.score "OxyphenButazone") - |> Test.label "long, mixed-case word" + |> Test.label.deprecated "long, mixed-case word" scrabbleScore.score.tests.ex9 = expect (8 == scrabbleScore.score "pinata") - |> Test.label "english-like word" + |> Test.label.deprecated "english-like word" scrabbleScore.score.tests.ex10 = expect (0 == scrabbleScore.score "") - |> Test.label "empty input" + |> Test.label.deprecated "empty input" scrabbleScore.score.tests.ex11 = expect (87 == scrabbleScore.score "abcdefghijklmnopqrstuvwxyz") - |> Test.label "entire alphabet available" + |> Test.label.deprecated "entire alphabet available" test> scrabbleScore.tests = runAll [ scrabbleScore.score.tests.ex1, diff --git a/exercises/practice/secret-handshake/.meta/testAnnotation.json b/exercises/practice/secret-handshake/.meta/testAnnotation.json index cb67680..1e5270e 100644 --- a/exercises/practice/secret-handshake/.meta/testAnnotation.json +++ b/exercises/practice/secret-handshake/.meta/testAnnotation.json @@ -1,46 +1,46 @@ [ { - "name": "secretHandshake.commands.tests.ex1", - "test_code": "expect ([Wink] === secretHandshake.commands 1)\n |> Test.label \"wink for 1\"" + "name": "wink for 1", + "test_code": "expect ([Wink] === secretHandshake.commands 1)\n |> Test.label.deprecated \"wink for 1\"" }, { - "name": "secretHandshake.commands.tests.ex2", - "test_code": "expect ([DoubleBlink] === secretHandshake.commands 2)\n |> Test.label \"double blink for 10\"" + "name": "double blink for 10", + "test_code": "expect ([DoubleBlink] === secretHandshake.commands 2)\n |> Test.label.deprecated \"double blink for 10\"" }, { - "name": "secretHandshake.commands.tests.ex3", - "test_code": "expect ([CloseYourEyes] === secretHandshake.commands 4)\n |> Test.label \"close your eyes for 100\"" + "name": "close your eyes for 100", + "test_code": "expect ([CloseYourEyes] === secretHandshake.commands 4)\n |> Test.label.deprecated \"close your eyes for 100\"" }, { - "name": "secretHandshake.commands.tests.ex4", - "test_code": "expect ([Jump] === secretHandshake.commands 8)\n |> Test.label \"jump for 1000\"" + "name": "jump for 1000", + "test_code": "expect ([Jump] === secretHandshake.commands 8)\n |> Test.label.deprecated \"jump for 1000\"" }, { - "name": "secretHandshake.commands.tests.ex5", - "test_code": "expect ([Wink, DoubleBlink] === secretHandshake.commands 3)\n |> Test.label \"combine two actions\"" + "name": "combine two actions", + "test_code": "expect ([Wink, DoubleBlink] === secretHandshake.commands 3)\n |> Test.label.deprecated \"combine two actions\"" }, { - "name": "secretHandshake.commands.tests.ex6", - "test_code": "expect ([DoubleBlink, Wink] === secretHandshake.commands 19)\n |> Test.label \"reverse two actions\"" + "name": "reverse two actions", + "test_code": "expect ([DoubleBlink, Wink] === secretHandshake.commands 19)\n |> Test.label.deprecated \"reverse two actions\"" }, { - "name": "secretHandshake.commands.tests.ex7", - "test_code": "expect ([Jump] === secretHandshake.commands 24)\n |> Test.label \"reversing one action gives the same action\"" + "name": "reversing one action gives the same action", + "test_code": "expect ([Jump] === secretHandshake.commands 24)\n |> Test.label.deprecated \"reversing one action gives the same action\"" }, { - "name": "secretHandshake.commands.tests.ex8", - "test_code": "expect ([] === secretHandshake.commands 16)\n |> Test.label \"reversing no actions still gives no actions\"" + "name": "reversing no actions still gives no actions", + "test_code": "expect ([] === secretHandshake.commands 16)\n |> Test.label.deprecated \"reversing no actions still gives no actions\"" }, { - "name": "secretHandshake.commands.tests.ex9", - "test_code": "expect ([Wink, DoubleBlink, CloseYourEyes, Jump] === secretHandshake.commands 15)\n |> Test.label \"all possible actions\"" + "name": "all possible actions", + "test_code": "expect ([Wink, DoubleBlink, CloseYourEyes, Jump] === secretHandshake.commands 15)\n |> Test.label.deprecated \"all possible actions\"" }, { - "name": "secretHandshake.commands.tests.ex10", - "test_code": "expect ([Jump, CloseYourEyes, DoubleBlink, Wink] === secretHandshake.commands 31)\n |> Test.label \"reverse all possible actions\"" + "name": "reverse all possible actions", + "test_code": "expect ([Jump, CloseYourEyes, DoubleBlink, Wink] === secretHandshake.commands 31)\n |> Test.label.deprecated \"reverse all possible actions\"" }, { - "name": "secretHandshake.commands.tests.ex11", - "test_code": "expect ([] === secretHandshake.commands 0)\n |> Test.label \"do nothing for zero\"" + "name": "do nothing for zero", + "test_code": "expect ([] === secretHandshake.commands 0)\n |> Test.label.deprecated \"do nothing for zero\"" } ] \ No newline at end of file diff --git a/exercises/practice/secret-handshake/.meta/testLoader.md b/exercises/practice/secret-handshake/.meta/testLoader.md index de16f95..33bfdb4 100644 --- a/exercises/practice/secret-handshake/.meta/testLoader.md +++ b/exercises/practice/secret-handshake/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for secret-handshake exercise ```ucm -.> load ./secretHandshake.u -.> add -.> load ./secretHandshake.test.u -.> add -.> move.term secretHandshake.tests tests +scratch/main> load ./secretHandshake.u +scratch/main> add +scratch/main> load ./secretHandshake.test.u +scratch/main> add +scratch/main> move.term secretHandshake.tests tests ``` diff --git a/exercises/practice/secret-handshake/secretHandshake.test.u b/exercises/practice/secret-handshake/secretHandshake.test.u index 454e699..874d408 100644 --- a/exercises/practice/secret-handshake/secretHandshake.test.u +++ b/exercises/practice/secret-handshake/secretHandshake.test.u @@ -1,46 +1,46 @@ secretHandshake.commands.tests.ex1 = expect ([Wink] === secretHandshake.commands 1) - |> Test.label "wink for 1" + |> Test.label.deprecated "wink for 1" secretHandshake.commands.tests.ex2 = expect ([DoubleBlink] === secretHandshake.commands 2) - |> Test.label "double blink for 10" + |> Test.label.deprecated "double blink for 10" secretHandshake.commands.tests.ex3 = expect ([CloseYourEyes] === secretHandshake.commands 4) - |> Test.label "close your eyes for 100" + |> Test.label.deprecated "close your eyes for 100" secretHandshake.commands.tests.ex4 = expect ([Jump] === secretHandshake.commands 8) - |> Test.label "jump for 1000" + |> Test.label.deprecated "jump for 1000" secretHandshake.commands.tests.ex5 = expect ([Wink, DoubleBlink] === secretHandshake.commands 3) - |> Test.label "combine two actions" + |> Test.label.deprecated "combine two actions" secretHandshake.commands.tests.ex6 = expect ([DoubleBlink, Wink] === secretHandshake.commands 19) - |> Test.label "reverse two actions" + |> Test.label.deprecated "reverse two actions" secretHandshake.commands.tests.ex7 = expect ([Jump] === secretHandshake.commands 24) - |> Test.label "reversing one action gives the same action" + |> Test.label.deprecated "reversing one action gives the same action" secretHandshake.commands.tests.ex8 = expect ([] === secretHandshake.commands 16) - |> Test.label "reversing no actions still gives no actions" + |> Test.label.deprecated "reversing no actions still gives no actions" secretHandshake.commands.tests.ex9 = expect ([Wink, DoubleBlink, CloseYourEyes, Jump] === secretHandshake.commands 15) - |> Test.label "all possible actions" + |> Test.label.deprecated "all possible actions" secretHandshake.commands.tests.ex10 = expect ([Jump, CloseYourEyes, DoubleBlink, Wink] === secretHandshake.commands 31) - |> Test.label "reverse all possible actions" + |> Test.label.deprecated "reverse all possible actions" secretHandshake.commands.tests.ex11 = expect ([] === secretHandshake.commands 0) - |> Test.label "do nothing for zero" + |> Test.label.deprecated "do nothing for zero" test> secretHandshake.tests = runAll [ secretHandshake.commands.tests.ex1, diff --git a/exercises/practice/sieve/.meta/examples/sieve.example.u b/exercises/practice/sieve/.meta/examples/sieve.example.u index 0cc1071..c5695eb 100644 --- a/exercises/practice/sieve/.meta/examples/sieve.example.u +++ b/exercises/practice/sieve/.meta/examples/sieve.example.u @@ -14,13 +14,13 @@ sieve.getPrimes max = do if (Set.contains possible primes) then squared = possible * possible toRemove = rangeBy (possible + 1) max possible - List.foreach toRemove removeN + ignore (List.map removeN toRemove) else () go = - sqrtUpper = Float.sqrt(toFloat max) |> base.Float.unsafeToInt |> truncate0 + sqrtUpper = Float.sqrt(toFloat max) |> Float.unsafeToInt |> truncate0 possible = List.rangeClosed 2 sqrtUpper - List.foreach possible primes' + ignore (List.map primes' possible) go Store.get @@ -36,4 +36,4 @@ sieve.rangeBy lower upper by = removeN: Nat -> {Store (Set Nat)} () removeN n = - Store.modify (s -> Set.delete n s) \ No newline at end of file + Store.modify (s -> Set.delete n s) diff --git a/exercises/practice/sieve/.meta/testAnnotation.json b/exercises/practice/sieve/.meta/testAnnotation.json index 99f36d6..245148d 100644 --- a/exercises/practice/sieve/.meta/testAnnotation.json +++ b/exercises/practice/sieve/.meta/testAnnotation.json @@ -1,22 +1,22 @@ [ { - "test_code": "sieve.test.ex1 = let\n\ttest.label \"no primes under two\" <| test.expect (primes 1 === [])", - "name": "sieve.test.ex1" + "name": "no primes under two", + "test_code": "let\n Test.label.deprecated \"no primes under two\" <| Test.expect (primes 1 === [])" }, { - "test_code": "sieve.test.ex2 = let\n\ttest.label \"find first prime\" <| test.expect (primes 2 === [2])", - "name": "sieve.test.ex2" + "name": "find first prime", + "test_code": "let\n Test.label.deprecated \"find first prime\" <| Test.expect (primes 2 === [2])" }, { - "test_code": "sieve.test.ex3 = let\n\ttest.label \"find primes up to 10\" <| test.expect (primes 10 === [2,3,5,7])", - "name": "sieve.test.ex3" + "name": "find primes up to 10", + "test_code": "let\n Test.label.deprecated \"find primes up to 10\" <| Test.expect (primes 10 === [2,3,5,7])" }, { - "test_code": "sieve.test.ex4 = let\n\ttest.label \"limit is prime\" <| test.expect (primes 13 === [2,3,5,7,11,13])", - "name": "sieve.test.ex4" + "name": "limit is prime", + "test_code": "let\n Test.label.deprecated \"limit is prime\" <| Test.expect (primes 13 === [2,3,5,7,11,13])" }, { - "test_code": "sieve.test.ex5 = let\n\ttest.label \"find primes up to 1000\" <| test.expect (primes 1000 === [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997])", - "name": "sieve.test.ex5" + "name": "find primes up to 1000", + "test_code": "let\n Test.label.deprecated \"find primes up to 1000\" <| Test.expect (primes 1000 === [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997])" } ] \ No newline at end of file diff --git a/exercises/practice/sieve/.meta/testLoader.md b/exercises/practice/sieve/.meta/testLoader.md index dd59390..ea060e2 100644 --- a/exercises/practice/sieve/.meta/testLoader.md +++ b/exercises/practice/sieve/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./sieve.u -.> add -.> load ./sieve.test.u -.> add -.> move.term sieve.tests tests +scratch/main> load ./sieve.u +scratch/main> add +scratch/main> load ./sieve.test.u +scratch/main> add +scratch/main> move.term sieve.tests tests ``` diff --git a/exercises/practice/sieve/sieve.test.u b/exercises/practice/sieve/sieve.test.u index 0817b2b..16799d1 100644 --- a/exercises/practice/sieve/sieve.test.u +++ b/exercises/practice/sieve/sieve.test.u @@ -1,17 +1,17 @@ sieve.test.ex1 = let - Test.label "no primes under two" <| Test.expect (primes 1 === []) + Test.label.deprecated "no primes under two" <| Test.expect (primes 1 === []) sieve.test.ex2 = let - Test.label "find first prime" <| Test.expect (primes 2 === [2]) + Test.label.deprecated "find first prime" <| Test.expect (primes 2 === [2]) sieve.test.ex3 = let - Test.label "find primes up to 10" <| Test.expect (primes 10 === [2,3,5,7]) + Test.label.deprecated "find primes up to 10" <| Test.expect (primes 10 === [2,3,5,7]) sieve.test.ex4 = let - Test.label "limit is prime" <| Test.expect (primes 13 === [2,3,5,7,11,13]) + Test.label.deprecated "limit is prime" <| Test.expect (primes 13 === [2,3,5,7,11,13]) sieve.test.ex5 = let - Test.label "find primes up to 1000" <| Test.expect (primes 1000 === [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]) + Test.label.deprecated "find primes up to 1000" <| Test.expect (primes 1000 === [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]) test> sieve.tests = runAll [ sieve.test.ex1, diff --git a/exercises/practice/simple-linked-list/.meta/examples/simpleLinkedList.example.u b/exercises/practice/simple-linked-list/.meta/examples/simpleLinkedList.example.u index f6af745..ea04698 100644 --- a/exercises/practice/simple-linked-list/.meta/examples/simpleLinkedList.example.u +++ b/exercises/practice/simple-linked-list/.meta/examples/simpleLinkedList.example.u @@ -14,8 +14,8 @@ LinkedList.fromList xs = List.foldRight (a acc -> Cons a acc) LinkedList.Nil xs LinkedList.head : LinkedList a -> Optional a LinkedList.head linkedList = match linkedList with - Nil -> None - Cons a _ -> Some a + LinkedList.Nil -> None + LinkedList.Cons a _ -> Some a LinkedList.isNil : LinkedList a -> Boolean LinkedList.isNil linkedList = match linkedList with @@ -24,17 +24,17 @@ LinkedList.isNil linkedList = match linkedList with LinkedList.tail : LinkedList a -> LinkedList a LinkedList.tail linkedList = match linkedList with - Cons a t -> t - Nil -> Nil + LinkedList.Cons a t -> t + LinkedList.Nil -> Nil LinkedList.reverseLinkedList : LinkedList a -> LinkedList a LinkedList.reverseLinkedList linkedList = go acc = cases - Nil -> acc - Cons a rest -> go (Cons a acc) rest + LinkedList.Nil -> acc + LinkedList.Cons a rest -> go (Cons a acc) rest go Nil linkedList LinkedList.toList : LinkedList a -> [a] LinkedList.toList linkedList = match linkedList with LinkedList.Nil -> List.empty - Cons a remaining -> a +: (toList remaining) + LinkedList.Cons a remaining -> a +: (toList remaining) diff --git a/exercises/practice/simple-linked-list/.meta/testAnnotation.json b/exercises/practice/simple-linked-list/.meta/testAnnotation.json index 6d5fb1a..360073c 100644 --- a/exercises/practice/simple-linked-list/.meta/testAnnotation.json +++ b/exercises/practice/simple-linked-list/.meta/testAnnotation.json @@ -1,30 +1,30 @@ [ { - "name": "linkedL.test.ex1", - "test_code":"linkedL.test.ex1 = \n\tlabel \"isNil applied to nil should be true\" <| expect (isNil nil && (not (isNil (new 1))))" + "name": "isNil applied to nil should be true", + "test_code": "Test.label.deprecated \"isNil applied to nil should be true\" <| expect (isNil nil && (not (isNil (new 1))))" }, { - "name": "linkedL.test.ex2", - "test_code":"linkedL.test.ex2 =\n\tlabel \"calling cons with nil is the same as calling new\" <| expect (cons 1 nil === new 1)" + "name": "calling cons with nil is the same as calling new", + "test_code": "Test.label.deprecated \"calling cons with nil is the same as calling new\" <| expect (cons 1 nil === new 1)" }, { - "name": "linkedL.test.ex3", - "test_code":"linkedL.test.ex3 _ =\n\tlistNats = !(listOf nat)\n\tlinkedList = fromList listNats\n\tlabel \"toList and fromList should be symmetrical\" <| expect (toList linkedList === listNats)" + "name": "toList and fromList should be symmetrical", + "test_code": "use test.deprecated.gen listOf nat\n listNats = !(listOf nat)\n linkedList = fromList listNats\n Test.label.deprecated \"toList and fromList should be symmetrical\" <| expect (toList linkedList === listNats)" }, { - "name": "linkedL.test.ex4", - "test_code": "linkedL.test.ex4 =\n\tconsTest = head (new 1) === Some 1\n\tnilTest = head nil === None\n\tlabel \"head should return optional element\" <| expect (consTest && nilTest)" + "name": "head should return optional element", + "test_code": "consTest = head (new 1) === Some 1\n nilTest = head nil === None\n Test.label.deprecated \"head should return optional element\" <| expect (consTest && nilTest)" }, { - "name": "linkedL.test.ex5", - "test_code": "linkedL.test.ex5 =\n\tl1 = new 1\n\tl2 = cons 2 l1\n\tmanyTest = tail l2 === l1\n\tconsTest = tail l1 === nil\n\tnilTest = head nil === None\n\tlabel \"tail should drop the first element\" <| expect (consTest && nilTest && manyTest)" + "name": "tail should drop the first element", + "test_code": "l1 = new 1\n l2 = cons 2 l1\n manyTest = tail l2 === l1\n consTest = tail l1 === nil\n nilTest = head nil === None\n Test.label.deprecated \"tail should drop the first element\" <| expect (consTest && nilTest && manyTest)" }, { - "name": "linkedL.test.ex6", - "test_code": "linkedL.test.ex6 _ =\n\tlistNats = !(listOf nat)\n\tlinkedList = fromList listNats\n\tlabel \"reversing a list twice should be original list\" <| expect (reverseLinkedList linkedList |> reverseLinkedList === linkedList)" + "name": "reversing a list twice should be original list", + "test_code": "use test.deprecated.gen listOf nat\n listNats = !(listOf nat)\n linkedList = fromList listNats\n Test.label.deprecated \"reversing a list twice should be original list\" <| expect (reverseLinkedList linkedList |> reverseLinkedList === linkedList)" }, { - "name": "linkedL.test.ex7", - "test_code": "linkedL.test.ex7 =\n\tnilTest = isNil nil\n\tconsTest = not <| isNil (new 1)\n\tlabel \"isNil should return appropriate boolean\" <| expect (nilTest && consTest)" + "name": "isNil should return appropriate boolean", + "test_code": "nilTest = isNil nil\n consTest = not <| isNil (new 1)\n Test.label.deprecated \"isNil should return appropriate boolean\" <| expect (nilTest && consTest)" } -] +] \ No newline at end of file diff --git a/exercises/practice/simple-linked-list/.meta/testLoader.md b/exercises/practice/simple-linked-list/.meta/testLoader.md index c8b85e4..6313caf 100644 --- a/exercises/practice/simple-linked-list/.meta/testLoader.md +++ b/exercises/practice/simple-linked-list/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for hello exercise ```ucm -.> load ./simpleLinkedList.u -.> add -.> load ./simpleLinkedList.test.u -.> add -.> move.term linkedL.tests tests +scratch/main> load ./simpleLinkedList.u +scratch/main> add +scratch/main> load ./simpleLinkedList.test.u +scratch/main> add +scratch/main> move.term linkedL.tests tests ``` diff --git a/exercises/practice/simple-linked-list/simpleLinkedList.test.u b/exercises/practice/simple-linked-list/simpleLinkedList.test.u index 0538652..51dccb0 100644 --- a/exercises/practice/simple-linked-list/simpleLinkedList.test.u +++ b/exercises/practice/simple-linked-list/simpleLinkedList.test.u @@ -3,20 +3,21 @@ use List ++ use LinkedList toList fromList new nil cons tail linkedL.test.ex1 = - label "isNil applied to nil should be true" <| expect (isNil nil && (not (isNil (new 1)))) + Test.label.deprecated "isNil applied to nil should be true" <| expect (isNil nil && (not (isNil (new 1)))) linkedL.test.ex2 = - label "calling cons with nil is the same as calling new" <| expect (cons 1 nil === new 1) + Test.label.deprecated "calling cons with nil is the same as calling new" <| expect (cons 1 nil === new 1) linkedL.test.ex3 _ = + use test.deprecated.gen listOf nat listNats = !(listOf nat) linkedList = fromList listNats - label "toList and fromList should be symmetrical" <| expect (toList linkedList === listNats) + Test.label.deprecated "toList and fromList should be symmetrical" <| expect (toList linkedList === listNats) linkedL.test.ex4 = consTest = head (new 1) === Some 1 nilTest = head nil === None - label "head should return optional element" <| expect (consTest && nilTest) + Test.label.deprecated "head should return optional element" <| expect (consTest && nilTest) linkedL.test.ex5= l1 = new 1 @@ -24,16 +25,17 @@ linkedL.test.ex5= manyTest = tail l2 === l1 consTest = tail l1 === nil nilTest = head nil === None - label "tail should drop the first element" <| expect (consTest && nilTest && manyTest) + Test.label.deprecated "tail should drop the first element" <| expect (consTest && nilTest && manyTest) linkedL.test.ex6 _ = + use test.deprecated.gen listOf nat listNats = !(listOf nat) linkedList = fromList listNats - label "reversing a list twice should be original list" <| expect (reverseLinkedList linkedList |> reverseLinkedList === linkedList) + Test.label.deprecated "reversing a list twice should be original list" <| expect (reverseLinkedList linkedList |> reverseLinkedList === linkedList) linkedL.test.ex7 = nilTest = isNil nil consTest = not <| isNil (new 1) - label "isNil should return appropriate boolean" <| expect (nilTest && consTest) + Test.label.deprecated "isNil should return appropriate boolean" <| expect (nilTest && consTest) test> linkedL.tests = Test.run ex1 ++ Test.run ex2 ++ (runs 10 ex3) ++ Test.run ex4 ++ Test.run ex5 ++ (runs 10 ex6) ++ Test.run ex7 diff --git a/exercises/practice/space-age/.meta/testAnnotation.json b/exercises/practice/space-age/.meta/testAnnotation.json index da83420..3f975ef 100644 --- a/exercises/practice/space-age/.meta/testAnnotation.json +++ b/exercises/practice/space-age/.meta/testAnnotation.json @@ -1,38 +1,38 @@ [ { - "test_code": "spaceAge.test.ex1 = let\n\tTest.label \"age on Earth\" <| Test.expect (age \"Earth\" 1000000000 +- (Some 31.69))", - "name": "spaceAge.test.ex1" + "name": "age on Earth", + "test_code": "let\n Test.label.deprecated \"age on Earth\" <| Test.expect (age \"Earth\" 1000000000 +- (Some 31.69))" }, { - "test_code": "spaceAge.test.ex2 = let\n\tTest.label \"age on Mercury\" <| Test.expect (age \"Mercury\" 2134835688 +- (Some 280.88))", - "name": "spaceAge.test.ex2" + "name": "age on Mercury", + "test_code": "let\n Test.label.deprecated \"age on Mercury\" <| Test.expect (age \"Mercury\" 2134835688 +- (Some 280.88))" }, { - "test_code": "spaceAge.test.ex3 = let\n\tTest.label \"age on Venus\" <| Test.expect (age \"Venus\" 189839836 +- (Some 9.78))", - "name": "spaceAge.test.ex3" + "name": "age on Venus", + "test_code": "let\n Test.label.deprecated \"age on Venus\" <| Test.expect (age \"Venus\" 189839836 +- (Some 9.78))" }, { - "test_code": "spaceAge.test.ex4 = let\n\tTest.label \"age on Mars\" <| Test.expect (age \"Mars\" 2129871239 +- (Some 35.88))", - "name": "spaceAge.test.ex4" + "name": "age on Mars", + "test_code": "let\n Test.label.deprecated \"age on Mars\" <| Test.expect (age \"Mars\" 2129871239 +- (Some 35.88))" }, { - "test_code": "spaceAge.test.ex5 = let\n\tTest.label \"age on Jupiter\" <| Test.expect (age \"Jupiter\" 901876382 +- (Some 2.41))", - "name": "spaceAge.test.ex5" + "name": "age on Jupiter", + "test_code": "let\n Test.label.deprecated \"age on Jupiter\" <| Test.expect (age \"Jupiter\" 901876382 +- (Some 2.41))" }, { - "test_code": "spaceAge.test.ex6 = let\n\tTest.label \"age on Saturn\" <| Test.expect (age \"Saturn\" 2000000000 +- (Some 2.15))", - "name": "spaceAge.test.ex6" + "name": "age on Saturn", + "test_code": "let\n Test.label.deprecated \"age on Saturn\" <| Test.expect (age \"Saturn\" 2000000000 +- (Some 2.15))" }, { - "test_code": "spaceAge.test.ex7 = let\n\tTest.label \"age on Uranus\" <| Test.expect (age \"Uranus\" 1210123456 +- (Some 0.46))", - "name": "spaceAge.test.ex7" + "name": "age on Uranus", + "test_code": "let\n Test.label.deprecated \"age on Uranus\" <| Test.expect (age \"Uranus\" 1210123456 +- (Some 0.46))" }, { - "test_code": "spaceAge.test.ex8 = let\n\tTest.label \"age on Neptune\" <| Test.expect (age \"Neptune\" 1821023456 +- (Some 0.35))", - "name": "spaceAge.test.ex8" + "name": "age on Neptune", + "test_code": "let\n Test.label.deprecated \"age on Neptune\" <| Test.expect (age \"Neptune\" 1821023456 +- (Some 0.35))" }, { - "test_code": "spaceAge.test.ex9 = let\n\tTest.label \"invalid planet causes error\" <| Test.expect (age \"Sun\" 680804807 +- None)", - "name": "spaceAge.test.ex9" + "name": "invalid planet causes error", + "test_code": "let\n Test.label.deprecated \"invalid planet causes error\" <| Test.expect (age \"Sun\" 680804807 +- None)" } -] +] \ No newline at end of file diff --git a/exercises/practice/space-age/.meta/testLoader.md b/exercises/practice/space-age/.meta/testLoader.md index 8d349ea..5fe394e 100644 --- a/exercises/practice/space-age/.meta/testLoader.md +++ b/exercises/practice/space-age/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./spaceAge.u -.> add -.> load ./spaceAge.test.u -.> add -.> move.term spaceAge.tests tests +scratch/main> load ./spaceAge.u +scratch/main> add +scratch/main> load ./spaceAge.test.u +scratch/main> add +scratch/main> move.term spaceAge.tests tests ``` diff --git a/exercises/practice/space-age/spaceAge.test.u b/exercises/practice/space-age/spaceAge.test.u index d944b0d..0cbe2ef 100644 --- a/exercises/practice/space-age/spaceAge.test.u +++ b/exercises/practice/space-age/spaceAge.test.u @@ -10,31 +10,31 @@ answer spaceAge.+- expected = sameOptStatus && isWithinAllowance spaceAge.test.ex1 = let - Test.label "age on Earth" <| Test.expect (age "Earth" 1000000000 +- (Some 31.69)) + Test.label.deprecated "age on Earth" <| Test.expect (age "Earth" 1000000000 +- (Some 31.69)) spaceAge.test.ex2 = let - Test.label "age on Mercury" <| Test.expect (age "Mercury" 2134835688 +- (Some 280.88)) + Test.label.deprecated "age on Mercury" <| Test.expect (age "Mercury" 2134835688 +- (Some 280.88)) spaceAge.test.ex3 = let - Test.label "age on Venus" <| Test.expect (age "Venus" 189839836 +- (Some 9.78)) + Test.label.deprecated "age on Venus" <| Test.expect (age "Venus" 189839836 +- (Some 9.78)) spaceAge.test.ex4 = let - Test.label "age on Mars" <| Test.expect (age "Mars" 2129871239 +- (Some 35.88)) + Test.label.deprecated "age on Mars" <| Test.expect (age "Mars" 2129871239 +- (Some 35.88)) spaceAge.test.ex5 = let - Test.label "age on Jupiter" <| Test.expect (age "Jupiter" 901876382 +- (Some 2.41)) + Test.label.deprecated "age on Jupiter" <| Test.expect (age "Jupiter" 901876382 +- (Some 2.41)) spaceAge.test.ex6 = let - Test.label "age on Saturn" <| Test.expect (age "Saturn" 2000000000 +- (Some 2.15)) + Test.label.deprecated "age on Saturn" <| Test.expect (age "Saturn" 2000000000 +- (Some 2.15)) spaceAge.test.ex7 = let - Test.label "age on Uranus" <| Test.expect (age "Uranus" 1210123456 +- (Some 0.46)) + Test.label.deprecated "age on Uranus" <| Test.expect (age "Uranus" 1210123456 +- (Some 0.46)) spaceAge.test.ex8 = let - Test.label "age on Neptune" <| Test.expect (age "Neptune" 1821023456 +- (Some 0.35)) + Test.label.deprecated "age on Neptune" <| Test.expect (age "Neptune" 1821023456 +- (Some 0.35)) spaceAge.test.ex9 = let - Test.label "invalid planet causes error" <| Test.expect (age "Sun" 680804807 +- None) + Test.label.deprecated "invalid planet causes error" <| Test.expect (age "Sun" 680804807 +- None) test> spaceAge.tests = runAll [ spaceAge.test.ex1, diff --git a/exercises/practice/spiral-matrix/.meta/testAnnotation.json b/exercises/practice/spiral-matrix/.meta/testAnnotation.json index 930bc33..f22259d 100644 --- a/exercises/practice/spiral-matrix/.meta/testAnnotation.json +++ b/exercises/practice/spiral-matrix/.meta/testAnnotation.json @@ -1,26 +1,26 @@ [ { - "test_code": "spiralMatrix.test.ex1 = let\n\tTest.label \"empty spiral\" <| Test.expect (spiralMatrix 0 === [])", - "name": "spiralMatrix.test.ex1" + "name": "empty spiral", + "test_code": "let\n Test.label.deprecated \"empty spiral\" <| Test.expect (spiralMatrix 0 === [])" }, { - "test_code": "spiralMatrix.test.ex2 = let\n\tTest.label \"trivial spiral\" <| Test.expect (spiralMatrix 1 === [[1]])", - "name": "spiralMatrix.test.ex2" + "name": "trivial spiral", + "test_code": "let\n Test.label.deprecated \"trivial spiral\" <| Test.expect (spiralMatrix 1 === [[1]])" }, { - "test_code": "spiralMatrix.test.ex3 = let\n\tTest.label \"spiral of size 2\" <| Test.expect (spiralMatrix 2 === [[1,2],[4,3]])", - "name": "spiralMatrix.test.ex3" + "name": "spiral of size 2", + "test_code": "let\n Test.label.deprecated \"spiral of size 2\" <| Test.expect (spiralMatrix 2 === [[1,2],[4,3]])" }, { - "test_code": "spiralMatrix.test.ex4 = let\n\tTest.label \"spiral of size 3\" <| Test.expect (spiralMatrix 3 === [[1,2,3],[8,9,4],[7,6,5]])", - "name": "spiralMatrix.test.ex4" + "name": "spiral of size 3", + "test_code": "let\n Test.label.deprecated \"spiral of size 3\" <| Test.expect (spiralMatrix 3 === [[1,2,3],[8,9,4],[7,6,5]])" }, { - "test_code": "spiralMatrix.test.ex5 = let\n\tTest.label \"spiral of size 4\" <| Test.expect (spiralMatrix 4 === [[1,2,3,4],[12,13,14,5],[11,16,15,6],[10,9,8,7]])", - "name": "spiralMatrix.test.ex5" + "name": "spiral of size 4", + "test_code": "let\n Test.label.deprecated \"spiral of size 4\" <| Test.expect (spiralMatrix 4 === [[1,2,3,4],[12,13,14,5],[11,16,15,6],[10,9,8,7]])" }, { - "test_code": "spiralMatrix.test.ex6 = let\n\tTest.label \"spiral of size 5\" <| Test.expect (spiralMatrix 5 === [[1,2,3,4,5],[16,17,18,19,6],[15,24,25,20,7],[14,23,22,21,8],[13,12,11,10,9]])", - "name": "spiralMatrix.test.ex6" + "name": "spiral of size 5", + "test_code": "let\n Test.label.deprecated \"spiral of size 5\" <| Test.expect (spiralMatrix 5 === [[1,2,3,4,5],[16,17,18,19,6],[15,24,25,20,7],[14,23,22,21,8],[13,12,11,10,9]])" } -] +] \ No newline at end of file diff --git a/exercises/practice/spiral-matrix/.meta/testLoader.md b/exercises/practice/spiral-matrix/.meta/testLoader.md index 6d5d14f..bb83a9e 100644 --- a/exercises/practice/spiral-matrix/.meta/testLoader.md +++ b/exercises/practice/spiral-matrix/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./spiralMatrix.u -.> add -.> load ./spiralMatrix.test.u -.> add -.> move.term spiralMatrix.tests tests +scratch/main> load ./spiralMatrix.u +scratch/main> add +scratch/main> load ./spiralMatrix.test.u +scratch/main> add +scratch/main> move.term spiralMatrix.tests tests ``` diff --git a/exercises/practice/spiral-matrix/spiralMatrix.test.u b/exercises/practice/spiral-matrix/spiralMatrix.test.u index 9ffa376..d2769b9 100644 --- a/exercises/practice/spiral-matrix/spiralMatrix.test.u +++ b/exercises/practice/spiral-matrix/spiralMatrix.test.u @@ -1,20 +1,20 @@ spiralMatrix.test.ex1 = let - Test.label "empty spiral" <| Test.expect (spiralMatrix 0 === []) + Test.label.deprecated "empty spiral" <| Test.expect (spiralMatrix 0 === []) spiralMatrix.test.ex2 = let - Test.label "trivial spiral" <| Test.expect (spiralMatrix 1 === [[1]]) + Test.label.deprecated "trivial spiral" <| Test.expect (spiralMatrix 1 === [[1]]) spiralMatrix.test.ex3 = let - Test.label "spiral of size 2" <| Test.expect (spiralMatrix 2 === [[1,2],[4,3]]) + Test.label.deprecated "spiral of size 2" <| Test.expect (spiralMatrix 2 === [[1,2],[4,3]]) spiralMatrix.test.ex4 = let - Test.label "spiral of size 3" <| Test.expect (spiralMatrix 3 === [[1,2,3],[8,9,4],[7,6,5]]) + Test.label.deprecated "spiral of size 3" <| Test.expect (spiralMatrix 3 === [[1,2,3],[8,9,4],[7,6,5]]) spiralMatrix.test.ex5 = let - Test.label "spiral of size 4" <| Test.expect (spiralMatrix 4 === [[1,2,3,4],[12,13,14,5],[11,16,15,6],[10,9,8,7]]) + Test.label.deprecated "spiral of size 4" <| Test.expect (spiralMatrix 4 === [[1,2,3,4],[12,13,14,5],[11,16,15,6],[10,9,8,7]]) spiralMatrix.test.ex6 = let - Test.label "spiral of size 5" <| Test.expect (spiralMatrix 5 === [[1,2,3,4,5],[16,17,18,19,6],[15,24,25,20,7],[14,23,22,21,8],[13,12,11,10,9]]) + Test.label.deprecated "spiral of size 5" <| Test.expect (spiralMatrix 5 === [[1,2,3,4,5],[16,17,18,19,6],[15,24,25,20,7],[14,23,22,21,8],[13,12,11,10,9]]) test> spiralMatrix.tests = runAll [ spiralMatrix.test.ex1, diff --git a/exercises/practice/stream-ops/.meta/examples/streamOps.example.u b/exercises/practice/stream-ops/.meta/examples/streamOps.example.u index bca19e5..061485c 100644 --- a/exercises/practice/stream-ops/.meta/examples/streamOps.example.u +++ b/exercises/practice/stream-ops/.meta/examples/streamOps.example.u @@ -2,7 +2,7 @@ structural ability MyStream a where emit : a -> {MyStream a} () MyStream.fromList : [a] -> '{MyStream a} () MyStream.fromList list = 'let - List.foreach list MyStream.emit + ignore (List.map MyStream.emit list) MyStream.toList : '{g, MyStream a} r -> '{g} [a] MyStream.toList streamFunction = 'let @@ -48,6 +48,6 @@ MyStream.flatMap f streamFunction = 'let go = cases { r } -> r {MyStream.emit a -> resume} -> - base.ignore (f a) + ignore (f a) handle resume () with go handle !streamFunction with go diff --git a/exercises/practice/stream-ops/.meta/testAnnotation.json b/exercises/practice/stream-ops/.meta/testAnnotation.json index 95b8c3c..e195842 100644 --- a/exercises/practice/stream-ops/.meta/testAnnotation.json +++ b/exercises/practice/stream-ops/.meta/testAnnotation.json @@ -1,34 +1,34 @@ [ { - "name": "stream.test.ex1", - "test_code": "stream.test.ex1 = let\n\texpected = [1,2,3]\n\tgo =\n\t\ts = MyStream.fromList expected\n\t\t!(MyStream.toList s)\n\tTest.label \"to and from list\" <| Test.expect (go === expected )" + "name": "to and from list", + "test_code": "let\n expected = [1,2,3]\n go =\n s = MyStream.fromList expected\n !(MyStream.toList s)\n Test.label.deprecated \"to and from list\" <| Test.expect (go === expected )" }, { - "name": "stream.test.ex2", - "test_code": "stream.test.ex2 = let\n\tgo =\n\t\ts = MyStream.fromList List.empty\n\t\t!(MyStream.toList s)\n\tTest.label \"to and from list with empty list\" <| Test.expect (go === List.empty )" + "name": "to and from list with empty list", + "test_code": "let\n go =\n s = MyStream.fromList List.empty\n !(MyStream.toList s)\n Test.label.deprecated \"to and from list with empty list\" <| Test.expect (go === List.empty )" }, { - "name": "stream.test.ex3", - "test_code": "stream.test.ex3 = let\n\texpected = [1,2,3]\n\tgo = 'let\n\t\tList.map (a -> let\n\t\t\tMyStream.emit a\n\t\t\ta\n\t\t) expected\n\tTest.label \"toListWithResult returns list and result\" <| Test.expect (!(MyStream.toListWithResult go) === (expected, expected))" + "name": "toListWithResult returns list and result", + "test_code": "let\n expected = [1,2,3]\n go = 'let\n List.map (a -> let\n MyStream.emit a\n a\n ) expected\n Test.label.deprecated \"toListWithResult returns list and result\" <| Test.expect (!(MyStream.toListWithResult go) === (expected, expected))" }, { - "name": "stream.test.ex4", - "test_code": "stream.test.ex4 = let\n\texpected = [1,2,3]\n\tgo = 'let\n\t\tList.foldLeft (acc a -> let\n\t\t\tMyStream.emit (a Nat.+ acc)\n\t\t\ta\n\t\t) 0 expected\n\tTest.label \"ignore returns only the result, not the materialized stream\" <| Test.expect ((MyStream.ignore go) === 3 )" + "name": "ignore returns only the result, not the materialized stream", + "test_code": "let\n expected = [1,2,3]\n go = 'let\n List.foldLeft (acc a -> let\n MyStream.emit (a Nat.+ acc)\n a\n ) 0 expected\n Test.label.deprecated \"ignore returns only the result, not the materialized stream\" <| Test.expect ((MyStream.ignore go) === 3 )" }, { - "name": "stream.test.ex5", - "test_code": "stream.test.ex5 = let\n\tgo = '(List.map MyStream.emit [])\n\tTest.label \"ignore handles empty stream\" <| Test.expect ((MyStream.ignore go) === [] )" + "name": "ignore handles empty stream", + "test_code": "let\n go = '(List.map MyStream.emit [])\n Test.label.deprecated \"ignore handles empty stream\" <| Test.expect ((MyStream.ignore go) === [] )" }, { - "name": "stream.test.ex6", - "test_code": "stream.test.ex6 = let\n\texpected = [1,2,3,4]\n\tgo = MyStream.fromList expected |> MyStream.filter isEven\n\tTest.label \"filters stream\" <| Test.expect (!(MyStream.toList go) === [2,4] )" + "name": "filters stream", + "test_code": "let\n expected = [1,2,3,4]\n go = MyStream.fromList expected |> MyStream.filter isEven\n Test.label.deprecated \"filters stream\" <| Test.expect (!(MyStream.toList go) === [2,4] )" }, { - "name": "stream.test.ex7", - "test_code": "stream.test.ex7 = let\n\texpected = [1,2,3,4]\n\tgo = MyStream.fromList expected |> MyStream.map increment\n\tTest.label \"maps over stream\" <| Test.expect (!(MyStream.toList go) === [2,3,4,5] )" + "name": "maps over stream", + "test_code": "let\n expected = [1,2,3,4]\n go = MyStream.fromList expected |> MyStream.map increment\n Test.label.deprecated \"maps over stream\" <| Test.expect (!(MyStream.toList go) === [2,3,4,5] )" }, { - "name": "stream.test.ex8", - "test_code": "stream.test.ex8 = let\n\texpected = [1,2,3]\n\tgo = MyStream.fromList expected |> MyStream.flatMap (elem -> !(MyStream.fromList (List.fill 2 elem)))\n\tTest.label \"flatMaps over stream\" <| Test.expect (!(MyStream.toList go) === [1,1,2,2,3,3] )" + "name": "flatMaps over stream", + "test_code": "let\n expected = [1,2,3]\n go = MyStream.fromList expected |> MyStream.flatMap (elem -> !(MyStream.fromList (List.fill 2 elem)))\n Test.label.deprecated \"flatMaps over stream\" <| Test.expect (!(MyStream.toList go) === [1,1,2,2,3,3] )" } -] +] \ No newline at end of file diff --git a/exercises/practice/stream-ops/.meta/testLoader.md b/exercises/practice/stream-ops/.meta/testLoader.md index 41baa89..9f40e55 100644 --- a/exercises/practice/stream-ops/.meta/testLoader.md +++ b/exercises/practice/stream-ops/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./streamOps.u -.> add -.> load ./streamOps.test.u -.> add -.> move.term stream.tests tests +scratch/main> load ./streamOps.u +scratch/main> add +scratch/main> load ./streamOps.test.u +scratch/main> add +scratch/main> move.term stream.tests tests ``` diff --git a/exercises/practice/stream-ops/streamOps.test.u b/exercises/practice/stream-ops/streamOps.test.u index 791f1cc..cf1c12c 100644 --- a/exercises/practice/stream-ops/streamOps.test.u +++ b/exercises/practice/stream-ops/streamOps.test.u @@ -3,13 +3,13 @@ stream.test.ex1 = let go = s = MyStream.fromList expected !(MyStream.toList s) - Test.label "to and from list" <| Test.expect (go === expected ) + Test.label.deprecated "to and from list" <| Test.expect (go === expected ) stream.test.ex2 = let go = s = MyStream.fromList List.empty !(MyStream.toList s) - Test.label "to and from list with empty list" <| Test.expect (go === List.empty ) + Test.label.deprecated "to and from list with empty list" <| Test.expect (go === List.empty ) stream.test.ex3 = let expected = [1,2,3] @@ -18,7 +18,7 @@ stream.test.ex3 = let MyStream.emit a a ) expected - Test.label "toListWithResult returns list and result" <| Test.expect (!(MyStream.toListWithResult go) === (expected, expected)) + Test.label.deprecated "toListWithResult returns list and result" <| Test.expect (!(MyStream.toListWithResult go) === (expected, expected)) stream.test.ex4 = let expected = [1,2,3] @@ -27,26 +27,26 @@ stream.test.ex4 = let MyStream.emit (a Nat.+ acc) a ) 0 expected - Test.label "ignore returns only the result, not the materialized stream" <| Test.expect ((MyStream.ignore go) === 3 ) + Test.label.deprecated "ignore returns only the result, not the materialized stream" <| Test.expect ((MyStream.ignore go) === 3 ) stream.test.ex5 = let go = '(List.map MyStream.emit []) - Test.label "ignore handles empty stream" <| Test.expect ((MyStream.ignore go) === [] ) + Test.label.deprecated "ignore handles empty stream" <| Test.expect ((MyStream.ignore go) === [] ) stream.test.ex6 = let expected = [1,2,3,4] go = MyStream.fromList expected |> MyStream.filter isEven - Test.label "filters stream" <| Test.expect (!(MyStream.toList go) === [2,4] ) + Test.label.deprecated "filters stream" <| Test.expect (!(MyStream.toList go) === [2,4] ) stream.test.ex7 = let expected = [1,2,3,4] go = MyStream.fromList expected |> MyStream.map increment - Test.label "maps over stream" <| Test.expect (!(MyStream.toList go) === [2,3,4,5] ) + Test.label.deprecated "maps over stream" <| Test.expect (!(MyStream.toList go) === [2,3,4,5] ) stream.test.ex8 = let expected = [1,2,3] go = MyStream.fromList expected |> MyStream.flatMap (elem -> !(MyStream.fromList (List.fill 2 elem))) - Test.label "flatMaps over stream" <| Test.expect (!(MyStream.toList go) === [1,1,2,2,3,3] ) + Test.label.deprecated "flatMaps over stream" <| Test.expect (!(MyStream.toList go) === [1,1,2,2,3,3] ) test> stream.tests = runAll [ stream.test.ex1, diff --git a/exercises/practice/sublist/.meta/testAnnotation.json b/exercises/practice/sublist/.meta/testAnnotation.json index 9c97a7a..7709514 100644 --- a/exercises/practice/sublist/.meta/testAnnotation.json +++ b/exercises/practice/sublist/.meta/testAnnotation.json @@ -1,74 +1,74 @@ [ { - "test_code":"sublist.test.ex1 = let\n\tTest.label \"empty lists\" <| Test.expect (sublist [] [] === Equal)", - "name":"sublist.test.ex1" + "name": "empty lists", + "test_code": "let\n Test.label.deprecated \"empty lists\" <| Test.expect (sublist [] [] === Equal)" }, { - "test_code":"sublist.test.ex2 = let\n\tTest.label \"empty list within non empty list\" <| Test.expect (sublist [] [1,2,3] === Sublist)", - "name":"sublist.test.ex2" + "name": "empty list within non empty list", + "test_code": "let\n Test.label.deprecated \"empty list within non empty list\" <| Test.expect (sublist [] [1,2,3] === Sublist)" }, { - "test_code":"sublist.test.ex3 = let\n\tTest.label \"non empty list contains empty list\" <| Test.expect (sublist [1,2,3] [] === Superlist)", - "name":"sublist.test.ex3" + "name": "non empty list contains empty list", + "test_code": "let\n Test.label.deprecated \"non empty list contains empty list\" <| Test.expect (sublist [1,2,3] [] === Superlist)" }, { - "test_code":"sublist.test.ex4 = let\n\tTest.label \"list equals itself\" <| Test.expect (sublist [1,2,3] [1,2,3] === Equal)", - "name":"sublist.test.ex4" + "name": "list equals itself", + "test_code": "let\n Test.label.deprecated \"list equals itself\" <| Test.expect (sublist [1,2,3] [1,2,3] === Equal)" }, { - "test_code":"sublist.test.ex5 = let\n\tTest.label \"different lists\" <| Test.expect (sublist [1,2,3] [2,3,4] === Unequal)", - "name":"sublist.test.ex5" + "name": "different lists", + "test_code": "let\n Test.label.deprecated \"different lists\" <| Test.expect (sublist [1,2,3] [2,3,4] === Unequal)" }, { - "test_code":"sublist.test.ex6 = let\n\tTest.label \"false start\" <| Test.expect (sublist [1,2,5] [0,1,2,3,1,2,5,6] === Sublist)", - "name":"sublist.test.ex6" + "name": "false start", + "test_code": "let\n Test.label.deprecated \"false start\" <| Test.expect (sublist [1,2,5] [0,1,2,3,1,2,5,6] === Sublist)" }, { - "test_code":"sublist.test.ex7 = let\n\tTest.label \"consecutive\" <| Test.expect (sublist [1,1,2] [0,1,1,1,2,1,2] === Sublist)", - "name":"sublist.test.ex7" + "name": "consecutive", + "test_code": "let\n Test.label.deprecated \"consecutive\" <| Test.expect (sublist [1,1,2] [0,1,1,1,2,1,2] === Sublist)" }, { - "test_code":"sublist.test.ex8 = let\n\tTest.label \"sublist at start\" <| Test.expect (sublist [0,1,2] [0,1,2,3,4,5] === Sublist)", - "name":"sublist.test.ex8" + "name": "sublist at start", + "test_code": "let\n Test.label.deprecated \"sublist at start\" <| Test.expect (sublist [0,1,2] [0,1,2,3,4,5] === Sublist)" }, { - "test_code":"sublist.test.ex9 = let\n\tTest.label \"sublist in middle\" <| Test.expect (sublist [2,3,4] [0,1,2,3,4,5] === Sublist)", - "name":"sublist.test.ex9" + "name": "sublist in middle", + "test_code": "let\n Test.label.deprecated \"sublist in middle\" <| Test.expect (sublist [2,3,4] [0,1,2,3,4,5] === Sublist)" }, { - "test_code":"sublist.test.ex10 = let\n\tTest.label \"sublist at end\" <| Test.expect (sublist [3,4,5] [0,1,2,3,4,5] === Sublist)", - "name":"sublist.test.ex10" + "name": "sublist at end", + "test_code": "let\n Test.label.deprecated \"sublist at end\" <| Test.expect (sublist [3,4,5] [0,1,2,3,4,5] === Sublist)" }, { - "test_code":"sublist.test.ex11 = let\n\tTest.label \"at start of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [0,1,2] === Superlist)", - "name":"sublist.test.ex11" + "name": "at start of superlist", + "test_code": "let\n Test.label.deprecated \"at start of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [0,1,2] === Superlist)" }, { - "test_code":"sublist.test.ex12 = let\n\tTest.label \"in middle of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [2,3] === Superlist)", - "name":"sublist.test.ex12" + "name": "in middle of superlist", + "test_code": "let\n Test.label.deprecated \"in middle of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [2,3] === Superlist)" }, { - "test_code":"sublist.test.ex13 = let\n\tTest.label \"at end of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [3,4,5] === Superlist)", - "name":"sublist.test.ex13" + "name": "at end of superlist", + "test_code": "let\n Test.label.deprecated \"at end of superlist\" <| Test.expect (sublist [0,1,2,3,4,5] [3,4,5] === Superlist)" }, { - "test_code":"sublist.test.ex14 = let\n\tTest.label \"first list missing element from second list\" <| Test.expect (sublist [1,3] [1,2,3] === Unequal)", - "name":"sublist.test.ex14" + "name": "first list missing element from second list", + "test_code": "let\n Test.label.deprecated \"first list missing element from second list\" <| Test.expect (sublist [1,3] [1,2,3] === Unequal)" }, { - "test_code":"sublist.test.ex15 = let\n\tTest.label \"second list missing element from first list\" <| Test.expect (sublist [1,2,3] [1,3] === Unequal)", - "name":"sublist.test.ex15" + "name": "second list missing element from first list", + "test_code": "let\n Test.label.deprecated \"second list missing element from first list\" <| Test.expect (sublist [1,2,3] [1,3] === Unequal)" }, { - "test_code":"sublist.test.ex16 = let\n\tTest.label \"first list missing additional digits from second list\" <| Test.expect (sublist [1,2] [1,22] === Unequal)", - "name":"sublist.test.ex16" + "name": "first list missing additional digits from second list", + "test_code": "let\n Test.label.deprecated \"first list missing additional digits from second list\" <| Test.expect (sublist [1,2] [1,22] === Unequal)" }, { - "test_code":"sublist.test.ex17 = let\n\tTest.label \"order matters to a list\" <| Test.expect (sublist [1,2,3] [3,2,1] === Unequal)", - "name":"sublist.test.ex17" + "name": "order matters to a list", + "test_code": "let\n Test.label.deprecated \"order matters to a list\" <| Test.expect (sublist [1,2,3] [3,2,1] === Unequal)" }, { - "test_code":"sublist.test.ex18 = let\n\tTest.label \"same digits but different numbers\" <| Test.expect (sublist [1,0,1] [10,1] === Unequal)", - "name":"sublist.test.ex18" + "name": "same digits but different numbers", + "test_code": "let\n Test.label.deprecated \"same digits but different numbers\" <| Test.expect (sublist [1,0,1] [10,1] === Unequal)" } -] +] \ No newline at end of file diff --git a/exercises/practice/sublist/.meta/testLoader.md b/exercises/practice/sublist/.meta/testLoader.md index 8077d43..02d89cd 100644 --- a/exercises/practice/sublist/.meta/testLoader.md +++ b/exercises/practice/sublist/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./sublist.u -.> add -.> load ./sublist.test.u -.> add -.> move.term sublist.tests tests +scratch/main> load ./sublist.u +scratch/main> add +scratch/main> load ./sublist.test.u +scratch/main> add +scratch/main> move.term sublist.tests tests ``` diff --git a/exercises/practice/sublist/sublist.test.u b/exercises/practice/sublist/sublist.test.u index 772e067..5b0ca65 100644 --- a/exercises/practice/sublist/sublist.test.u +++ b/exercises/practice/sublist/sublist.test.u @@ -1,56 +1,56 @@ sublist.test.ex1 = let - Test.label "empty lists" <| Test.expect (sublist [] [] === Equal) + Test.label.deprecated "empty lists" <| Test.expect (sublist [] [] === Equal) sublist.test.ex2 = let - Test.label "empty list within non empty list" <| Test.expect (sublist [] [1,2,3] === Sublist) + Test.label.deprecated "empty list within non empty list" <| Test.expect (sublist [] [1,2,3] === Sublist) sublist.test.ex3 = let - Test.label "non empty list contains empty list" <| Test.expect (sublist [1,2,3] [] === Superlist) + Test.label.deprecated "non empty list contains empty list" <| Test.expect (sublist [1,2,3] [] === Superlist) sublist.test.ex4 = let - Test.label "list equals itself" <| Test.expect (sublist [1,2,3] [1,2,3] === Equal) + Test.label.deprecated "list equals itself" <| Test.expect (sublist [1,2,3] [1,2,3] === Equal) sublist.test.ex5 = let - Test.label "different lists" <| Test.expect (sublist [1,2,3] [2,3,4] === Unequal) + Test.label.deprecated "different lists" <| Test.expect (sublist [1,2,3] [2,3,4] === Unequal) sublist.test.ex6 = let - Test.label "false start" <| Test.expect (sublist [1,2,5] [0,1,2,3,1,2,5,6] === Sublist) + Test.label.deprecated "false start" <| Test.expect (sublist [1,2,5] [0,1,2,3,1,2,5,6] === Sublist) sublist.test.ex7 = let - Test.label "consecutive" <| Test.expect (sublist [1,1,2] [0,1,1,1,2,1,2] === Sublist) + Test.label.deprecated "consecutive" <| Test.expect (sublist [1,1,2] [0,1,1,1,2,1,2] === Sublist) sublist.test.ex8 = let - Test.label "sublist at start" <| Test.expect (sublist [0,1,2] [0,1,2,3,4,5] === Sublist) + Test.label.deprecated "sublist at start" <| Test.expect (sublist [0,1,2] [0,1,2,3,4,5] === Sublist) sublist.test.ex9 = let - Test.label "sublist in middle" <| Test.expect (sublist [2,3,4] [0,1,2,3,4,5] === Sublist) + Test.label.deprecated "sublist in middle" <| Test.expect (sublist [2,3,4] [0,1,2,3,4,5] === Sublist) sublist.test.ex10 = let - Test.label "sublist at end" <| Test.expect (sublist [3,4,5] [0,1,2,3,4,5] === Sublist) + Test.label.deprecated "sublist at end" <| Test.expect (sublist [3,4,5] [0,1,2,3,4,5] === Sublist) sublist.test.ex11 = let - Test.label "at start of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [0,1,2] === Superlist) + Test.label.deprecated "at start of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [0,1,2] === Superlist) sublist.test.ex12 = let - Test.label "in middle of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [2,3] === Superlist) + Test.label.deprecated "in middle of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [2,3] === Superlist) sublist.test.ex13 = let - Test.label "at end of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [3,4,5] === Superlist) + Test.label.deprecated "at end of superlist" <| Test.expect (sublist [0,1,2,3,4,5] [3,4,5] === Superlist) sublist.test.ex14 = let - Test.label "first list missing element from second list" <| Test.expect (sublist [1,3] [1,2,3] === Unequal) + Test.label.deprecated "first list missing element from second list" <| Test.expect (sublist [1,3] [1,2,3] === Unequal) sublist.test.ex15 = let - Test.label "second list missing element from first list" <| Test.expect (sublist [1,2,3] [1,3] === Unequal) + Test.label.deprecated "second list missing element from first list" <| Test.expect (sublist [1,2,3] [1,3] === Unequal) sublist.test.ex16 = let - Test.label "first list missing additional digits from second list" <| Test.expect (sublist [1,2] [1,22] === Unequal) + Test.label.deprecated "first list missing additional digits from second list" <| Test.expect (sublist [1,2] [1,22] === Unequal) sublist.test.ex17 = let - Test.label "order matters to a list" <| Test.expect (sublist [1,2,3] [3,2,1] === Unequal) + Test.label.deprecated "order matters to a list" <| Test.expect (sublist [1,2,3] [3,2,1] === Unequal) sublist.test.ex18 = let - Test.label "same digits but different numbers" <| Test.expect (sublist [1,0,1] [10,1] === Unequal) + Test.label.deprecated "same digits but different numbers" <| Test.expect (sublist [1,0,1] [10,1] === Unequal) test> sublist.tests = runAll [ sublist.test.ex1, diff --git a/exercises/practice/sum-of-multiples/.meta/testAnnotation.json b/exercises/practice/sum-of-multiples/.meta/testAnnotation.json index 9c14aac..6d70d2e 100644 --- a/exercises/practice/sum-of-multiples/.meta/testAnnotation.json +++ b/exercises/practice/sum-of-multiples/.meta/testAnnotation.json @@ -1,66 +1,66 @@ [ { - "name": "sumOfMultiples.test.t1", - "test_code": "Test.label \"no multiples within limit\" <| expect ((sumOfMultiples [3,5] 1) === 0)" + "name": "no multiples within limit", + "test_code": "Test.label.deprecated \"no multiples within limit\" <| expect ((sumOfMultiples [3,5] 1) === 0)" }, { - "name": "sumOfMultiples.test.t2", - "test_code": "Test.label \"one factor has multiples within limit\" <| expect ((sumOfMultiples [3,5] 4) === 3)" + "name": "one factor has multiples within limit", + "test_code": "Test.label.deprecated \"one factor has multiples within limit\" <| expect ((sumOfMultiples [3,5] 4) === 3)" }, { - "name": "sumOfMultiples.test.t3", - "test_code": "Test.label \"more than one multiple within limit\" <| expect ((sumOfMultiples [3] 7) === 9)" + "name": "more than one multiple within limit", + "test_code": "Test.label.deprecated \"more than one multiple within limit\" <| expect ((sumOfMultiples [3] 7) === 9)" }, { - "name": "sumOfMultiples.test.t4", - "test_code": "Test.label \"more than one factor with multiples within limit\" <| expect ((sumOfMultiples [3,5] 10) === 23)" + "name": "more than one factor with multiples within limit", + "test_code": "Test.label.deprecated \"more than one factor with multiples within limit\" <| expect ((sumOfMultiples [3,5] 10) === 23)" }, { - "name": "sumOfMultiples.test.t5", - "test_code": "Test.label \"each multiple is only counted once\" <| expect ((sumOfMultiples [3,5] 100) === 2318)" + "name": "each multiple is only counted once", + "test_code": "Test.label.deprecated \"each multiple is only counted once\" <| expect ((sumOfMultiples [3,5] 100) === 2318)" }, { - "name": "sumOfMultiples.test.t6", - "test_code": "Test.label \"a much larger limit\" <| expect ((sumOfMultiples [3,5] 1000) === 233168)" + "name": "a much larger limit", + "test_code": "Test.label.deprecated \"a much larger limit\" <| expect ((sumOfMultiples [3,5] 1000) === 233168)" }, { - "name": "sumOfMultiples.test.t7", - "test_code": "Test.label \"three factors\" <| expect ((sumOfMultiples [7, 13, 17] 20) === 51)" + "name": "three factors", + "test_code": "Test.label.deprecated \"three factors\" <| expect ((sumOfMultiples [7, 13, 17] 20) === 51)" }, { - "name": "sumOfMultiples.test.t8", - "test_code": "Test.label \"factors not relatively prime\" <| expect ((sumOfMultiples [4, 6] 15) === 30)" + "name": "factors not relatively prime", + "test_code": "Test.label.deprecated \"factors not relatively prime\" <| expect ((sumOfMultiples [4, 6] 15) === 30)" }, { - "name": "sumOfMultiples.test.t9", - "test_code": "Test.label \"some pairs of factors relatively prime and some not\" <| expect ((sumOfMultiples [5, 6, 8] 150) === 4419)" + "name": "some pairs of factors relatively prime and some not", + "test_code": "Test.label.deprecated \"some pairs of factors relatively prime and some not\" <| expect ((sumOfMultiples [5, 6, 8] 150) === 4419)" }, { - "name": "sumOfMultiples.test.t10", - "test_code": "Test.label \"one factor is a multiple of another\" <| expect ((sumOfMultiples [5, 25] 51) === 275)" + "name": "one factor is a multiple of another", + "test_code": "Test.label.deprecated \"one factor is a multiple of another\" <| expect ((sumOfMultiples [5, 25] 51) === 275)" }, { - "name": "sumOfMultiples.test.t11", - "test_code": "Test.label \"much larger factors\" <| expect ((sumOfMultiples [43, 47] 10000) === 2203160)" + "name": "much larger factors", + "test_code": "Test.label.deprecated \"much larger factors\" <| expect ((sumOfMultiples [43, 47] 10000) === 2203160)" }, { - "name": "sumOfMultiples.test.t12", - "test_code": "Test.label \"all numbers are multiples of 1\" <| expect ((sumOfMultiples [1] 100) === 4950)" + "name": "all numbers are multiples of 1", + "test_code": "Test.label.deprecated \"all numbers are multiples of 1\" <| expect ((sumOfMultiples [1] 100) === 4950)" }, { - "name": "sumOfMultiples.test.t13", - "test_code": "Test.label \"no factors means an empty sum\" <| expect ((sumOfMultiples [] 1000) === 0)" + "name": "no factors means an empty sum", + "test_code": "Test.label.deprecated \"no factors means an empty sum\" <| expect ((sumOfMultiples [] 1000) === 0)" }, { - "name": "sumOfMultiples.test.t14", - "test_code": "Test.label \"the only multiple of 0 is 0\" <| expect ((sumOfMultiples [0] 1) === 0)" + "name": "the only multiple of 0 is 0", + "test_code": "Test.label.deprecated \"the only multiple of 0 is 0\" <| expect ((sumOfMultiples [0] 1) === 0)" }, { - "name": "sumOfMultiples.test.t15", - "test_code": "Test.label \"the factor 0 does not affect the sum of multiples of other factors\" <| expect ((sumOfMultiples [3, 0] 4) === 3)" + "name": "the factor 0 does not affect the sum of multiples of other factors", + "test_code": "Test.label.deprecated \"the factor 0 does not affect the sum of multiples of other factors\" <| expect ((sumOfMultiples [3, 0] 4) === 3)" }, { - "name": "sumOfMultiples.test.t16", - "test_code": "Test.label \"solutions using include-exclude must extend to cardinality greater than 3\" <| \nexpect ((sumOfMultiples [2, 3, 5, 7, 11] 10000) === 39614537)" + "name": "solutions using include-exclude must extend to cardinality greater than 3", + "test_code": "Test.label.deprecated \"solutions using include-exclude must extend to cardinality greater than 3\" <|\n expect ((sumOfMultiples [2, 3, 5, 7, 11] 10000) === 39614537)" } -] +] \ No newline at end of file diff --git a/exercises/practice/sum-of-multiples/.meta/testLoader.md b/exercises/practice/sum-of-multiples/.meta/testLoader.md index 7568e87..b48e14e 100644 --- a/exercises/practice/sum-of-multiples/.meta/testLoader.md +++ b/exercises/practice/sum-of-multiples/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for hello exercise ```ucm -.> load ./sumOfMultiples.u -.> add -.> load ./sumOfMultiples.test.u -.> add -.> move.term sumOfMultiples.tests tests +scratch/main> load ./sumOfMultiples.u +scratch/main> add +scratch/main> load ./sumOfMultiples.test.u +scratch/main> add +scratch/main> move.term sumOfMultiples.tests tests ``` diff --git a/exercises/practice/sum-of-multiples/sumOfMultiples.test.u b/exercises/practice/sum-of-multiples/sumOfMultiples.test.u index 86ed8ff..2baab2d 100644 --- a/exercises/practice/sum-of-multiples/sumOfMultiples.test.u +++ b/exercises/practice/sum-of-multiples/sumOfMultiples.test.u @@ -1,50 +1,50 @@ sumOfMultiples.test.t1 = - Test.label "no multiples within limit" <| expect ((sumOfMultiples [3,5] 1) === 0) + Test.label.deprecated "no multiples within limit" <| expect ((sumOfMultiples [3,5] 1) === 0) sumOfMultiples.test.t2 = - Test.label "one factor has multiples within limit" <| expect ((sumOfMultiples [3,5] 4) === 3) + Test.label.deprecated "one factor has multiples within limit" <| expect ((sumOfMultiples [3,5] 4) === 3) sumOfMultiples.test.t3 = - Test.label "more than one multiple within limit" <| expect ((sumOfMultiples [3] 7) === 9) + Test.label.deprecated "more than one multiple within limit" <| expect ((sumOfMultiples [3] 7) === 9) sumOfMultiples.test.t4 = - Test.label "more than one factor with multiples within limit" <| expect ((sumOfMultiples [3,5] 10) === 23) + Test.label.deprecated "more than one factor with multiples within limit" <| expect ((sumOfMultiples [3,5] 10) === 23) sumOfMultiples.test.t5 = - Test.label "each multiple is only counted once" <| expect ((sumOfMultiples [3,5] 100) === 2318) + Test.label.deprecated "each multiple is only counted once" <| expect ((sumOfMultiples [3,5] 100) === 2318) sumOfMultiples.test.t6 = - Test.label "a much larger limit" <| expect ((sumOfMultiples [3,5] 1000) === 233168) + Test.label.deprecated "a much larger limit" <| expect ((sumOfMultiples [3,5] 1000) === 233168) sumOfMultiples.test.t7 = - Test.label "three factors" <| expect ((sumOfMultiples [7, 13, 17] 20) === 51) + Test.label.deprecated "three factors" <| expect ((sumOfMultiples [7, 13, 17] 20) === 51) sumOfMultiples.test.t8 = - Test.label "factors not relatively prime" <| expect ((sumOfMultiples [4, 6] 15) === 30) + Test.label.deprecated "factors not relatively prime" <| expect ((sumOfMultiples [4, 6] 15) === 30) sumOfMultiples.test.t9 = - Test.label "some pairs of factors relatively prime and some not" <| expect ((sumOfMultiples [5, 6, 8] 150) === 4419) + Test.label.deprecated "some pairs of factors relatively prime and some not" <| expect ((sumOfMultiples [5, 6, 8] 150) === 4419) sumOfMultiples.test.t10 = - Test.label "one factor is a multiple of another" <| expect ((sumOfMultiples [5, 25] 51) === 275) + Test.label.deprecated "one factor is a multiple of another" <| expect ((sumOfMultiples [5, 25] 51) === 275) sumOfMultiples.test.t11 = - Test.label "much larger factors" <| expect ((sumOfMultiples [43, 47] 10000) === 2203160) + Test.label.deprecated "much larger factors" <| expect ((sumOfMultiples [43, 47] 10000) === 2203160) sumOfMultiples.test.t12 = - Test.label "all numbers are multiples of 1" <| expect ((sumOfMultiples [1] 100) === 4950) + Test.label.deprecated "all numbers are multiples of 1" <| expect ((sumOfMultiples [1] 100) === 4950) sumOfMultiples.test.t13 = - Test.label "no factors means an empty sum" <| expect ((sumOfMultiples [] 1000) === 0) + Test.label.deprecated "no factors means an empty sum" <| expect ((sumOfMultiples [] 1000) === 0) sumOfMultiples.test.t14 = - Test.label "the only multiple of 0 is 0" <| expect ((sumOfMultiples [0] 1) === 0) + Test.label.deprecated "the only multiple of 0 is 0" <| expect ((sumOfMultiples [0] 1) === 0) sumOfMultiples.test.t15 = - Test.label "the factor 0 does not affect the sum of multiples of other factors" <| expect ((sumOfMultiples [3, 0] 4) === 3) + Test.label.deprecated "the factor 0 does not affect the sum of multiples of other factors" <| expect ((sumOfMultiples [3, 0] 4) === 3) sumOfMultiples.test.t16 = - Test.label "solutions using include-exclude must extend to cardinality greater than 3" <| + Test.label.deprecated "solutions using include-exclude must extend to cardinality greater than 3" <| expect ((sumOfMultiples [2, 3, 5, 7, 11] 10000) === 39614537) test> sumOfMultiples.tests = runAll [ diff --git a/exercises/practice/yacht/.meta/testAnnotation.json b/exercises/practice/yacht/.meta/testAnnotation.json index 767612f..b5afd04 100644 --- a/exercises/practice/yacht/.meta/testAnnotation.json +++ b/exercises/practice/yacht/.meta/testAnnotation.json @@ -1,118 +1,118 @@ [ { - "name": "yacht.yacht.tests.ex1", - "test_code": "expect (50 == yacht.yacht Yacht [5, 5, 5, 5, 5])\n |> Test.label \"Yacht\"" + "name": "Yacht", + "test_code": "expect (50 == yacht.yacht Yacht [5, 5, 5, 5, 5])\n |> Test.label.deprecated \"Yacht\"" }, { - "name": "yacht.yacht.tests.ex2", - "test_code": "expect (0 == yacht.yacht Yacht [1, 3, 3, 2, 5])\n |> Test.label \"Not Yacht\"" + "name": "Not Yacht", + "test_code": "expect (0 == yacht.yacht Yacht [1, 3, 3, 2, 5])\n |> Test.label.deprecated \"Not Yacht\"" }, { - "name": "yacht.yacht.tests.ex3", - "test_code": "expect (3 == yacht.yacht Ones [1, 1, 1, 3, 5])\n |> Test.label \"Ones\"" + "name": "Ones", + "test_code": "expect (3 == yacht.yacht Ones [1, 1, 1, 3, 5])\n |> Test.label.deprecated \"Ones\"" }, { - "name": "yacht.yacht.tests.ex4", - "test_code": "expect (3 == yacht.yacht Ones [3, 1, 1, 5, 1])\n |> Test.label \"Ones, out of order\"" + "name": "Ones, out of order", + "test_code": "expect (3 == yacht.yacht Ones [3, 1, 1, 5, 1])\n |> Test.label.deprecated \"Ones, out of order\"" }, { - "name": "yacht.yacht.tests.ex5", - "test_code": "expect (0 == yacht.yacht Ones [4, 3, 6, 5, 5])\n |> Test.label \"No ones\"" + "name": "No ones", + "test_code": "expect (0 == yacht.yacht Ones [4, 3, 6, 5, 5])\n |> Test.label.deprecated \"No ones\"" }, { - "name": "yacht.yacht.tests.ex6", - "test_code": "expect (2 == yacht.yacht Twos [2, 3, 4, 5, 6])\n |> Test.label \"Twos\"" + "name": "Twos", + "test_code": "expect (2 == yacht.yacht Twos [2, 3, 4, 5, 6])\n |> Test.label.deprecated \"Twos\"" }, { - "name": "yacht.yacht.tests.ex7", - "test_code": "expect (8 == yacht.yacht Fours [1, 4, 1, 4, 1])\n |> Test.label \"Fours\"" + "name": "Fours", + "test_code": "expect (8 == yacht.yacht Fours [1, 4, 1, 4, 1])\n |> Test.label.deprecated \"Fours\"" }, { - "name": "yacht.yacht.tests.ex8", - "test_code": "expect (15 == yacht.yacht Threes [3, 3, 3, 3, 3])\n |> Test.label \"Yacht counted as threes\"" + "name": "Yacht counted as threes", + "test_code": "expect (15 == yacht.yacht Threes [3, 3, 3, 3, 3])\n |> Test.label.deprecated \"Yacht counted as threes\"" }, { - "name": "yacht.yacht.tests.ex9", - "test_code": "expect (0 == yacht.yacht Fives [3, 3, 3, 3, 3])\n |> Test.label \"Yacht of 3s counted as fives\"" + "name": "Yacht of 3s counted as fives", + "test_code": "expect (0 == yacht.yacht Fives [3, 3, 3, 3, 3])\n |> Test.label.deprecated \"Yacht of 3s counted as fives\"" }, { - "name": "yacht.yacht.tests.ex10", - "test_code": "expect (10 == yacht.yacht Fives [1, 5, 3, 5, 3])\n |> Test.label \"Fives\"" + "name": "Fives", + "test_code": "expect (10 == yacht.yacht Fives [1, 5, 3, 5, 3])\n |> Test.label.deprecated \"Fives\"" }, { - "name": "yacht.yacht.tests.ex11", - "test_code": "expect (6 == yacht.yacht Sixes [2, 3, 4, 5, 6])\n |> Test.label \"Sixes\"" + "name": "Sixes", + "test_code": "expect (6 == yacht.yacht Sixes [2, 3, 4, 5, 6])\n |> Test.label.deprecated \"Sixes\"" }, { - "name": "yacht.yacht.tests.ex12", - "test_code": "expect (16 == yacht.yacht FullHouse [2, 2, 4, 4, 4])\n |> Test.label \"Full house two small, three big\"" + "name": "Full house two small, three big", + "test_code": "expect (16 == yacht.yacht FullHouse [2, 2, 4, 4, 4])\n |> Test.label.deprecated \"Full house two small, three big\"" }, { - "name": "yacht.yacht.tests.ex13", - "test_code": "expect (19 == yacht.yacht FullHouse [5, 3, 3, 5, 3])\n |> Test.label \"Full house three small, two big\"" + "name": "Full house three small, two big", + "test_code": "expect (19 == yacht.yacht FullHouse [5, 3, 3, 5, 3])\n |> Test.label.deprecated \"Full house three small, two big\"" }, { - "name": "yacht.yacht.tests.ex14", - "test_code": "expect (0 == yacht.yacht FullHouse [2, 2, 4, 4, 5])\n |> Test.label \"Two pair is not a full house\"" + "name": "Two pair is not a full house", + "test_code": "expect (0 == yacht.yacht FullHouse [2, 2, 4, 4, 5])\n |> Test.label.deprecated \"Two pair is not a full house\"" }, { - "name": "yacht.yacht.tests.ex15", - "test_code": "expect (0 == yacht.yacht FullHouse [1, 4, 4, 4, 4])\n |> Test.label \"Four of a kind is not a full house\"" + "name": "Four of a kind is not a full house", + "test_code": "expect (0 == yacht.yacht FullHouse [1, 4, 4, 4, 4])\n |> Test.label.deprecated \"Four of a kind is not a full house\"" }, { - "name": "yacht.yacht.tests.ex16", - "test_code": "expect (0 == yacht.yacht FullHouse [2, 2, 2, 2, 2])\n |> Test.label \"Yacht is not a full house\"" + "name": "Yacht is not a full house", + "test_code": "expect (0 == yacht.yacht FullHouse [2, 2, 2, 2, 2])\n |> Test.label.deprecated \"Yacht is not a full house\"" }, { - "name": "yacht.yacht.tests.ex17", - "test_code": "expect (24 == yacht.yacht FourOfAKind [6, 6, 4, 6, 6])\n |> Test.label \"Four of a Kind\"" + "name": "Four of a Kind", + "test_code": "expect (24 == yacht.yacht FourOfAKind [6, 6, 4, 6, 6])\n |> Test.label.deprecated \"Four of a Kind\"" }, { - "name": "yacht.yacht.tests.ex18", - "test_code": "expect (12 == yacht.yacht FourOfAKind [3, 3, 3, 3, 3])\n |> Test.label \"Yacht can be scored as Four of a Kind\"" + "name": "Yacht can be scored as Four of a Kind", + "test_code": "expect (12 == yacht.yacht FourOfAKind [3, 3, 3, 3, 3])\n |> Test.label.deprecated \"Yacht can be scored as Four of a Kind\"" }, { - "name": "yacht.yacht.tests.ex19", - "test_code": "expect (0 == yacht.yacht FourOfAKind [3, 3, 3, 5, 5])\n |> Test.label \"Full house is not Four of a Kind\"" + "name": "Full house is not Four of a Kind", + "test_code": "expect (0 == yacht.yacht FourOfAKind [3, 3, 3, 5, 5])\n |> Test.label.deprecated \"Full house is not Four of a Kind\"" }, { - "name": "yacht.yacht.tests.ex20", - "test_code": "expect (30 == yacht.yacht LittleStraight [3, 5, 4, 1, 2])\n |> Test.label \"Little Straight\"" + "name": "Little Straight", + "test_code": "expect (30 == yacht.yacht LittleStraight [3, 5, 4, 1, 2])\n |> Test.label.deprecated \"Little Straight\"" }, { - "name": "yacht.yacht.tests.ex21", - "test_code": "expect (0 == yacht.yacht BigStraight [1, 2, 3, 4, 5])\n |> Test.label \"Little Straight as Big Straight\"" + "name": "Little Straight as Big Straight", + "test_code": "expect (0 == yacht.yacht BigStraight [1, 2, 3, 4, 5])\n |> Test.label.deprecated \"Little Straight as Big Straight\"" }, { - "name": "yacht.yacht.tests.ex22", - "test_code": "expect (0 == yacht.yacht LittleStraight [1, 1, 2, 3, 4])\n |> Test.label \"Four in order but not a little straight\"" + "name": "Four in order but not a little straight", + "test_code": "expect (0 == yacht.yacht LittleStraight [1, 1, 2, 3, 4])\n |> Test.label.deprecated \"Four in order but not a little straight\"" }, { - "name": "yacht.yacht.tests.ex23", - "test_code": "expect (0 == yacht.yacht LittleStraight [1, 2, 3, 4, 6])\n |> Test.label \"No pairs but not a little straight\"" + "name": "No pairs but not a little straight", + "test_code": "expect (0 == yacht.yacht LittleStraight [1, 2, 3, 4, 6])\n |> Test.label.deprecated \"No pairs but not a little straight\"" }, { - "name": "yacht.yacht.tests.ex24", - "test_code": "expect (0 == yacht.yacht LittleStraight [1, 1, 3, 4, 5])\n |> Test.label \"Minimum is 1, maximum is 5, but not a little straight\"" + "name": "Minimum is 1, maximum is 5, but not a little straight", + "test_code": "expect (0 == yacht.yacht LittleStraight [1, 1, 3, 4, 5])\n |> Test.label.deprecated \"Minimum is 1, maximum is 5, but not a little straight\"" }, { - "name": "yacht.yacht.tests.ex25", - "test_code": "expect (30 == yacht.yacht BigStraight [4, 6, 2, 5, 3])\n |> Test.label \"Big Straight\"" + "name": "Big Straight", + "test_code": "expect (30 == yacht.yacht BigStraight [4, 6, 2, 5, 3])\n |> Test.label.deprecated \"Big Straight\"" }, { - "name": "yacht.yacht.tests.ex26", - "test_code": "expect (0 == yacht.yacht LittleStraight [6, 5, 4, 3, 2])\n |> Test.label \"Big Straight as little straight\"" + "name": "Big Straight as little straight", + "test_code": "expect (0 == yacht.yacht LittleStraight [6, 5, 4, 3, 2])\n |> Test.label.deprecated \"Big Straight as little straight\"" }, { - "name": "yacht.yacht.tests.ex27", - "test_code": "expect (0 == yacht.yacht BigStraight [6, 5, 4, 3, 1])\n |> Test.label \"No pairs but not a big straight\"" + "name": "No pairs but not a big straight", + "test_code": "expect (0 == yacht.yacht BigStraight [6, 5, 4, 3, 1])\n |> Test.label.deprecated \"No pairs but not a big straight\"" }, { - "name": "yacht.yacht.tests.ex28", - "test_code": "expect (23 == yacht.yacht Choice [3, 3, 5, 6, 6])\n |> Test.label \"Choice\"" + "name": "Choice", + "test_code": "expect (23 == yacht.yacht Choice [3, 3, 5, 6, 6])\n |> Test.label.deprecated \"Choice\"" }, { - "name": "yacht.yacht.tests.ex29", - "test_code": "expect (10 == yacht.yacht Choice [2, 2, 2, 2, 2])\n |> Test.label \"Yacht as choice\"" + "name": "Yacht as choice", + "test_code": "expect (10 == yacht.yacht Choice [2, 2, 2, 2, 2])\n |> Test.label.deprecated \"Yacht as choice\"" } ] \ No newline at end of file diff --git a/exercises/practice/yacht/.meta/testLoader.md b/exercises/practice/yacht/.meta/testLoader.md index b916171..f9f5297 100644 --- a/exercises/practice/yacht/.meta/testLoader.md +++ b/exercises/practice/yacht/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for yacht exercise ```ucm -.> load ./yacht.u -.> add -.> load ./yacht.test.u -.> add -.> move.term yacht.tests tests +scratch/main> load ./yacht.u +scratch/main> add +scratch/main> load ./yacht.test.u +scratch/main> add +scratch/main> move.term yacht.tests tests ``` diff --git a/exercises/practice/yacht/yacht.test.u b/exercises/practice/yacht/yacht.test.u index 923a9a6..b8d92f7 100644 --- a/exercises/practice/yacht/yacht.test.u +++ b/exercises/practice/yacht/yacht.test.u @@ -1,118 +1,118 @@ yacht.yacht.tests.ex1 = expect (50 == yacht.yacht Yacht [5, 5, 5, 5, 5]) - |> Test.label "Yacht" + |> Test.label.deprecated "Yacht" yacht.yacht.tests.ex2 = expect (0 == yacht.yacht Yacht [1, 3, 3, 2, 5]) - |> Test.label "Not Yacht" + |> Test.label.deprecated "Not Yacht" yacht.yacht.tests.ex3 = expect (3 == yacht.yacht Ones [1, 1, 1, 3, 5]) - |> Test.label "Ones" + |> Test.label.deprecated "Ones" yacht.yacht.tests.ex4 = expect (3 == yacht.yacht Ones [3, 1, 1, 5, 1]) - |> Test.label "Ones, out of order" + |> Test.label.deprecated "Ones, out of order" yacht.yacht.tests.ex5 = expect (0 == yacht.yacht Ones [4, 3, 6, 5, 5]) - |> Test.label "No ones" + |> Test.label.deprecated "No ones" yacht.yacht.tests.ex6 = expect (2 == yacht.yacht Twos [2, 3, 4, 5, 6]) - |> Test.label "Twos" + |> Test.label.deprecated "Twos" yacht.yacht.tests.ex7 = expect (8 == yacht.yacht Fours [1, 4, 1, 4, 1]) - |> Test.label "Fours" + |> Test.label.deprecated "Fours" yacht.yacht.tests.ex8 = expect (15 == yacht.yacht Threes [3, 3, 3, 3, 3]) - |> Test.label "Yacht counted as threes" + |> Test.label.deprecated "Yacht counted as threes" yacht.yacht.tests.ex9 = expect (0 == yacht.yacht Fives [3, 3, 3, 3, 3]) - |> Test.label "Yacht of 3s counted as fives" + |> Test.label.deprecated "Yacht of 3s counted as fives" yacht.yacht.tests.ex10 = expect (10 == yacht.yacht Fives [1, 5, 3, 5, 3]) - |> Test.label "Fives" + |> Test.label.deprecated "Fives" yacht.yacht.tests.ex11 = expect (6 == yacht.yacht Sixes [2, 3, 4, 5, 6]) - |> Test.label "Sixes" + |> Test.label.deprecated "Sixes" yacht.yacht.tests.ex12 = expect (16 == yacht.yacht FullHouse [2, 2, 4, 4, 4]) - |> Test.label "Full house two small, three big" + |> Test.label.deprecated "Full house two small, three big" yacht.yacht.tests.ex13 = expect (19 == yacht.yacht FullHouse [5, 3, 3, 5, 3]) - |> Test.label "Full house three small, two big" + |> Test.label.deprecated "Full house three small, two big" yacht.yacht.tests.ex14 = expect (0 == yacht.yacht FullHouse [2, 2, 4, 4, 5]) - |> Test.label "Two pair is not a full house" + |> Test.label.deprecated "Two pair is not a full house" yacht.yacht.tests.ex15 = expect (0 == yacht.yacht FullHouse [1, 4, 4, 4, 4]) - |> Test.label "Four of a kind is not a full house" + |> Test.label.deprecated "Four of a kind is not a full house" yacht.yacht.tests.ex16 = expect (0 == yacht.yacht FullHouse [2, 2, 2, 2, 2]) - |> Test.label "Yacht is not a full house" + |> Test.label.deprecated "Yacht is not a full house" yacht.yacht.tests.ex17 = expect (24 == yacht.yacht FourOfAKind [6, 6, 4, 6, 6]) - |> Test.label "Four of a Kind" + |> Test.label.deprecated "Four of a Kind" yacht.yacht.tests.ex18 = expect (12 == yacht.yacht FourOfAKind [3, 3, 3, 3, 3]) - |> Test.label "Yacht can be scored as Four of a Kind" + |> Test.label.deprecated "Yacht can be scored as Four of a Kind" yacht.yacht.tests.ex19 = expect (0 == yacht.yacht FourOfAKind [3, 3, 3, 5, 5]) - |> Test.label "Full house is not Four of a Kind" + |> Test.label.deprecated "Full house is not Four of a Kind" yacht.yacht.tests.ex20 = expect (30 == yacht.yacht LittleStraight [3, 5, 4, 1, 2]) - |> Test.label "Little Straight" + |> Test.label.deprecated "Little Straight" yacht.yacht.tests.ex21 = expect (0 == yacht.yacht BigStraight [1, 2, 3, 4, 5]) - |> Test.label "Little Straight as Big Straight" + |> Test.label.deprecated "Little Straight as Big Straight" yacht.yacht.tests.ex22 = expect (0 == yacht.yacht LittleStraight [1, 1, 2, 3, 4]) - |> Test.label "Four in order but not a little straight" + |> Test.label.deprecated "Four in order but not a little straight" yacht.yacht.tests.ex23 = expect (0 == yacht.yacht LittleStraight [1, 2, 3, 4, 6]) - |> Test.label "No pairs but not a little straight" + |> Test.label.deprecated "No pairs but not a little straight" yacht.yacht.tests.ex24 = expect (0 == yacht.yacht LittleStraight [1, 1, 3, 4, 5]) - |> Test.label "Minimum is 1, maximum is 5, but not a little straight" + |> Test.label.deprecated "Minimum is 1, maximum is 5, but not a little straight" yacht.yacht.tests.ex25 = expect (30 == yacht.yacht BigStraight [4, 6, 2, 5, 3]) - |> Test.label "Big Straight" + |> Test.label.deprecated "Big Straight" yacht.yacht.tests.ex26 = expect (0 == yacht.yacht LittleStraight [6, 5, 4, 3, 2]) - |> Test.label "Big Straight as little straight" + |> Test.label.deprecated "Big Straight as little straight" yacht.yacht.tests.ex27 = expect (0 == yacht.yacht BigStraight [6, 5, 4, 3, 1]) - |> Test.label "No pairs but not a big straight" + |> Test.label.deprecated "No pairs but not a big straight" yacht.yacht.tests.ex28 = expect (23 == yacht.yacht Choice [3, 3, 5, 6, 6]) - |> Test.label "Choice" + |> Test.label.deprecated "Choice" yacht.yacht.tests.ex29 = expect (10 == yacht.yacht Choice [2, 2, 2, 2, 2]) - |> Test.label "Yacht as choice" + |> Test.label.deprecated "Yacht as choice" test> yacht.tests = runAll [ yacht.yacht.tests.ex1, diff --git a/exercises/practice/zebra-puzzle/.meta/examples/zebraPuzzle.example.u b/exercises/practice/zebra-puzzle/.meta/examples/zebraPuzzle.example.u index aa45465..6ab15af 100644 --- a/exercises/practice/zebra-puzzle/.meta/examples/zebraPuzzle.example.u +++ b/exercises/practice/zebra-puzzle/.meta/examples/zebraPuzzle.example.u @@ -19,11 +19,11 @@ unique type Position = One | Two | Three | Four | Five Position.toInt : Position -> Int Position.toInt = cases - One -> +1 - Two -> +2 - Three -> +3 - Four -> +4 - Five -> +5 + Position.One -> +1 + Position.Two -> +2 + Position.Three -> +3 + Position.Four -> +4 + Position.Five -> +5 Position.fromInt : Int -> Position Position.fromInt = cases @@ -44,11 +44,11 @@ unique type HousePositions = {one : [House], two : [House], three : [House], fou atNextPosition : House -> HousePositions -> [House] atNextPosition pos housePos = match House.position pos with - One -> HousePositions.two housePos - Two -> HousePositions.three housePos - Three -> HousePositions.four housePos - Four -> HousePositions.five housePos - Five -> [] + Position.One -> HousePositions.two housePos + Position.Two -> HousePositions.three housePos + Position.Three -> HousePositions.four housePos + Position.Four -> HousePositions.five housePos + Position.Five -> [] -- for backtracking structural ability Stack a where diff --git a/exercises/practice/zebra-puzzle/.meta/testAnnotation.json b/exercises/practice/zebra-puzzle/.meta/testAnnotation.json index 7ba48f0..d261935 100644 --- a/exercises/practice/zebra-puzzle/.meta/testAnnotation.json +++ b/exercises/practice/zebra-puzzle/.meta/testAnnotation.json @@ -1,9 +1,10 @@ [ - {"name":"zebraPuzzle.test.ex1", - "test_code":"zebraPuzzle.test.ex1 = let\nTest.label \"resident who drinks water\" <| Test.expect (drinksWater === \"Norwegian\")" + { + "name": "resident who drinks water", + "test_code": "let\n Test.label.deprecated \"resident who drinks water\" <| Test.expect (drinksWater === \"Norwegian\")" }, { - "name":"zebraPuzzle.test.ex2", - "test_code":"zebraPuzzle.test.ex2 = let\nTest.label \"resident who owns zebra\" <| Test.expect (ownsZebra === \"Japanese\")" + "name": "resident who owns zebra", + "test_code": "let\n Test.label.deprecated \"resident who owns zebra\" <| Test.expect (ownsZebra === \"Japanese\")" } ] \ No newline at end of file diff --git a/exercises/practice/zebra-puzzle/.meta/testLoader.md b/exercises/practice/zebra-puzzle/.meta/testLoader.md index 3f591eb..dcf37f9 100644 --- a/exercises/practice/zebra-puzzle/.meta/testLoader.md +++ b/exercises/practice/zebra-puzzle/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript for the exercise ```ucm -.> load ./zebraPuzzle.u -.> add -.> load ./zebraPuzzle.test.u -.> add -.> move.term zebraPuzzle.tests tests +scratch/main> load ./zebraPuzzle.u +scratch/main> add +scratch/main> load ./zebraPuzzle.test.u +scratch/main> add +scratch/main> move.term zebraPuzzle.tests tests ``` diff --git a/exercises/practice/zebra-puzzle/zebraPuzzle.test.u b/exercises/practice/zebra-puzzle/zebraPuzzle.test.u index 6b8e9e5..fa5ab53 100644 --- a/exercises/practice/zebra-puzzle/zebraPuzzle.test.u +++ b/exercises/practice/zebra-puzzle/zebraPuzzle.test.u @@ -1,8 +1,8 @@ zebraPuzzle.test.ex1 = let - Test.label "resident who drinks water" <| Test.expect (drinksWater === "Norwegian") + Test.label.deprecated "resident who drinks water" <| Test.expect (drinksWater === "Norwegian") zebraPuzzle.test.ex2 = let - Test.label "resident who owns zebra" <| Test.expect (ownsZebra === "Japanese") + Test.label.deprecated "resident who owns zebra" <| Test.expect (ownsZebra === "Japanese") test> zebraPuzzle.tests = runAll[ zebraPuzzle.test.ex1, diff --git a/exercises/practice/zipper/.meta/testAnnotation.json b/exercises/practice/zipper/.meta/testAnnotation.json index 4c39b21..28a8553 100644 --- a/exercises/practice/zipper/.meta/testAnnotation.json +++ b/exercises/practice/zipper/.meta/testAnnotation.json @@ -1,50 +1,50 @@ [ { - "name": "zipper.test.ex1", - "test_code": "zipper.test.ex1 = let\n\ttestTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch 3 None None))\nTest.label \"run should not change tree\" <| Test.expect ( Zipper.runWithTree testTree '(base.id) |> at2 === testTree)" + "name": "run should not change tree", + "test_code": "let\n testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch 3 None None))\n Test.label.deprecated \"run should not change tree\" <| Test.expect ( Zipper.runWithTree testTree '(id) |> at2 === testTree)" }, { - "name": "zipper.test.ex2", - "test_code": "zipper.test.ex2 = let\n\tvalue = 2\ttestTree = Branch 1 (Some (Branch value None None)) (Some (Branch 3 None None))\tnav _ =\t\tZipper.left\t\tfocus\tTest.label \"can focus left\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "can focus left", + "test_code": "let\n value = 2\n testTree = Branch 1 (Some (Branch value None None)) (Some (Branch 3 None None))\n nav _ =\n Zipper.left\n Zipper.focus\n Test.label.deprecated \"can focus left\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex3", - "test_code": "zipper.test.ex3 = let\n\tvalue = 3\ttestTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch value None None))\tnav _ =\t\tZipper.right\t\tfocus\tTest.label \"can focus right\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "can focus right", + "test_code": "let\n value = 3\n testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch value None None))\n nav _ =\n Zipper.right\n Zipper.focus\n Test.label.deprecated \"can focus right\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex4", - "test_code": "zipper.test.ex4 = let\n\tvalue = 4\ttestTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch 3 None (Some (Branch value None None))))\tnav _ =\t\tZipper.right\t\tZipper.right\t\tfocus\tTest.label \"can move twice right\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "can move twice right", + "test_code": "let\n value = 4\n testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch 3 None (Some (Branch value None None))))\n nav _ =\n Zipper.right\n Zipper.right\n Zipper.focus\n Test.label.deprecated \"can move twice right\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex5", - "test_code": "zipper.test.ex5 = let\n\tvalue = 4\ttestTree = Branch 1 (Some (Branch 3 (Some (Branch value None None)) None )) (Some (Branch 2 None None))\tnav _ =\t\tZipper.left\t\tZipper.left\t\tfocus\tTest.label \"can move twice left\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "can move twice left", + "test_code": "let\n value = 4\n testTree = Branch 1 (Some (Branch 3 (Some (Branch value None None)) None )) (Some (Branch 2 None None))\n nav _ =\n Zipper.left\n Zipper.left\n Zipper.focus\n Test.label.deprecated \"can move twice left\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex6", - "test_code": "zipper.test.ex6 = let\n\tvalue = 4\ttestTree = Branch 1 (Some (Branch 3 None (Some (Branch value None None)))) (Some (Branch 2 None None))\tnav _ =\t\tZipper.left\t\tZipper.right\t\tfocus\tTest.label \"can move left and right\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "can move left and right", + "test_code": "let\n value = 4\n testTree = Branch 1 (Some (Branch 3 None (Some (Branch value None None)))) (Some (Branch 2 None None))\n nav _ =\n Zipper.left\n Zipper.right\n Zipper.focus\n Test.label.deprecated \"can move left and right\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex7", - "test_code": "zipper.test.ex7 = let\n\tvalue = 1\ttestTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\tnewLeft = 200\texpectedTree = Branch value (Some (Branch newLeft None None)) (Some (Branch 3 None None))\tnav _ =\t\tZipper.left\t\tZipper.setValue newLeft\t\tZipper.up\t\tfocus\tTest.label \"can move left, set value, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" + "name": "can move left, set value, and up", + "test_code": "let\n value = 1\n testTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n newLeft = 200\n expectedTree = Branch value (Some (Branch newLeft None None)) (Some (Branch 3 None None))\n nav _ =\n Zipper.left\n Zipper.setValue newLeft\n Zipper.up\n Zipper.focus\n Test.label.deprecated \"can move left, set value, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" }, { - "name": "zipper.test.ex8", - "test_code": "zipper.test.ex8 = let\n\tvalue = 1\ttestTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\tnewRight = 300\texpectedTree = Branch value (Some (Branch 2 None None)) (Some (Branch newRight None None))\tnav _ =\t\tZipper.right\t\tZipper.setValue newRight\t\tZipper.up\t\tfocus\tTest.label \"can move right, set value, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" + "name": "can move right, set value, and up", + "test_code": "let\n value = 1\n testTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n newRight = 300\n expectedTree = Branch value (Some (Branch 2 None None)) (Some (Branch newRight None None))\n nav _ =\n Zipper.right\n Zipper.setValue newRight\n Zipper.up\n Zipper.focus\n Test.label.deprecated \"can move right, set value, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" }, { - "name": "zipper.test.ex9", - "test_code": "zipper.test.ex9 = let\n\tvalue = 1\ttestTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\tnewLeft = 200\texpectedTree = Branch value (Some (Branch 2 (Some testTree) None)) (Some (Branch 3 None None))\tnav _ =\t\tZipper.left\t\tZipper.setLeft testTree\t\tZipper.up\t\tfocus\tTest.label \"can move left, set left tree, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" + "name": "can move left, set left tree, and up", + "test_code": "let\n value = 1\n testTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n newLeft = 200\n expectedTree = Branch value (Some (Branch 2 (Some testTree) None)) (Some (Branch 3 None None))\n nav _ =\n Zipper.left\n Zipper.setLeft testTree\n Zipper.up\n Zipper.focus\n Test.label.deprecated \"can move left, set left tree, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" }, { - "name": "zipper.test.ex10", - "test_code": "zipper.test.ex10 = let\n\tvalue = 1\ttestTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\tnewRight = 300\texpectedTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None (Some testTree)))\tnav _ =\t\tZipper.right\t\tZipper.setRight testTree\t\tZipper.up\t\tfocus\tTest.label \"can move right, set right tree, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" + "name": "can move right, set right tree, and up", + "test_code": "let\n value = 1\n testTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n newRight = 300\n expectedTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None (Some testTree)))\n nav _ =\n Zipper.right\n Zipper.setRight testTree\n Zipper.up\n Zipper.focus\n Test.label.deprecated \"can move right, set right tree, and up\" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree))" }, { - "name": "zipper.test.ex11", - "test_code": "zipper.test.ex11 = let\n\tvalue = 3\n\ttestTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch value None None))\n\tnav _ =\n\t\tZipper.right\n\t\tZipper.right\n\t\tZipper.right\n\t\tfocus\n\tTest.label \"returns self when no more rights\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "returns self when no more rights", + "test_code": "let\n value = 3\n testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch value None None))\n nav _ =\n Zipper.right\n Zipper.right\n Zipper.right\n Zipper.focus\n Test.label.deprecated \"returns self when no more rights\" <| Test.expect ( Zipper.run testTree nav === value)" }, { - "name": "zipper.test.ex12", - "test_code": "zipper.test.ex12 = let\n\tvalue = 1\n\ttestTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n\tnav _ =\n\tZipper.right\n\tZipper.up\n\tZipper.up\n\tfocus\n\tTest.label \"returns self when no more parents\" <| Test.expect ( Zipper.run testTree nav === value)" + "name": "returns self when no more parents", + "test_code": "let\n value = 1\n testTree = Branch value (Some (Branch 2 None None)) (Some (Branch 3 None None))\n nav _ =\n Zipper.right\n Zipper.up\n Zipper.up\n Zipper.focus\n Test.label.deprecated \"returns self when no more parents\" <| Test.expect ( Zipper.run testTree nav === value)" } -] +] \ No newline at end of file diff --git a/exercises/practice/zipper/.meta/testLoader.md b/exercises/practice/zipper/.meta/testLoader.md index c7d24f1..d74b81a 100644 --- a/exercises/practice/zipper/.meta/testLoader.md +++ b/exercises/practice/zipper/.meta/testLoader.md @@ -1,9 +1,9 @@ # Testing transcript ```ucm -.> load ./zipper.u -.> add -.> load ./zipper.test.u -.> add -.> move.term zipper.tests tests +scratch/main> load ./zipper.u +scratch/main> add +scratch/main> load ./zipper.test.u +scratch/main> add +scratch/main> move.term zipper.tests tests ``` diff --git a/exercises/practice/zipper/zipper.test.u b/exercises/practice/zipper/zipper.test.u index 34d0e43..e7ebf83 100644 --- a/exercises/practice/zipper/zipper.test.u +++ b/exercises/practice/zipper/zipper.test.u @@ -1,23 +1,23 @@ zipper.test.ex1 = let testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch 3 None None)) - Test.label "run should not change tree" <| Test.expect ( Zipper.runWithTree testTree '(id) |> at2 === testTree) + Test.label.deprecated "run should not change tree" <| Test.expect ( Zipper.runWithTree testTree '(id) |> at2 === testTree) zipper.test.ex2 = let value = 2 testTree = Branch 1 (Some (Branch value None None)) (Some (Branch 3 None None)) nav _ = Zipper.left - focus - Test.label "can focus left" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "can focus left" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex3 = let value = 3 testTree = Branch 1 (Some (Branch 2 None None)) (Some (Branch value None None)) nav _ = Zipper.right - focus - Test.label "can focus right" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "can focus right" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex4 = let value = 4 @@ -25,8 +25,8 @@ zipper.test.ex4 = let nav _ = Zipper.right Zipper.right - focus - Test.label "can move twice right" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "can move twice right" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex5 = let value = 4 @@ -34,8 +34,8 @@ zipper.test.ex5 = let nav _ = Zipper.left Zipper.left - focus - Test.label "can move twice left" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "can move twice left" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex6 = let value = 4 @@ -43,8 +43,8 @@ zipper.test.ex6 = let nav _ = Zipper.left Zipper.right - focus - Test.label "can move left and right" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "can move left and right" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex7 = let value = 1 @@ -55,8 +55,8 @@ zipper.test.ex7 = let Zipper.left Zipper.setValue newLeft Zipper.up - focus - Test.label "can move left, set value, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) + Zipper.focus + Test.label.deprecated "can move left, set value, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) zipper.test.ex8 = let value = 1 @@ -67,8 +67,8 @@ zipper.test.ex8 = let Zipper.right Zipper.setValue newRight Zipper.up - focus - Test.label "can move right, set value, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) + Zipper.focus + Test.label.deprecated "can move right, set value, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) zipper.test.ex9 = let value = 1 @@ -79,8 +79,8 @@ zipper.test.ex9 = let Zipper.left Zipper.setLeft testTree Zipper.up - focus - Test.label "can move left, set left tree, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) + Zipper.focus + Test.label.deprecated "can move left, set left tree, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) zipper.test.ex10 = let value = 1 @@ -91,8 +91,8 @@ zipper.test.ex10 = let Zipper.right Zipper.setRight testTree Zipper.up - focus - Test.label "can move right, set right tree, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) + Zipper.focus + Test.label.deprecated "can move right, set right tree, and up" <| Test.expect ( Zipper.runWithTree testTree nav === (value, expectedTree)) zipper.test.ex11 = let value = 3 @@ -101,8 +101,8 @@ zipper.test.ex11 = let Zipper.right Zipper.right Zipper.right - focus - Test.label "returns self when no more rights" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "returns self when no more rights" <| Test.expect ( Zipper.run testTree nav === value) zipper.test.ex12 = let value = 1 @@ -111,8 +111,8 @@ zipper.test.ex12 = let Zipper.right Zipper.up Zipper.up - focus - Test.label "returns self when no more parents" <| Test.expect ( Zipper.run testTree nav === value) + Zipper.focus + Test.label.deprecated "returns self when no more parents" <| Test.expect ( Zipper.run testTree nav === value) test> zipper.tests = runAll[ zipper.test.ex1,