From a0b6ceec5a800ae8879e9e84ce5eaeca2631a671 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Mon, 13 Jan 2025 16:58:26 +0100 Subject: [PATCH] Use `string` helper in templates --- .../practice/difference-of-squares/.meta/generator.tpl | 6 +++--- exercises/practice/isogram/.meta/generator.tpl | 4 ++-- exercises/practice/pangram/.meta/generator.tpl | 2 +- exercises/practice/roman-numerals/.meta/generator.tpl | 4 ++-- exercises/practice/scrabble-score/.meta/generator.tpl | 4 ++-- exercises/practice/two-fer/.meta/generator.tpl | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/exercises/practice/difference-of-squares/.meta/generator.tpl b/exercises/practice/difference-of-squares/.meta/generator.tpl index 89e9a1cad..a0899023d 100644 --- a/exercises/practice/difference-of-squares/.meta/generator.tpl +++ b/exercises/practice/difference-of-squares/.meta/generator.tpl @@ -3,16 +3,16 @@ difference-of-squares)) {{#test_cases.squareOfSum}} (deftest square-of-sum_test_{{idx}} - (testing "{{description}}" + (testing {{string description}} (is (= {{expected}} (difference-of-squares/square-of-sum {{input.number}}))))) {{/test_cases.squareOfSum~}} {{#test_cases.sumOfSquares}} (deftest sum-of-squares_test_{{idx}} - (testing "{{description}}" + (testing {{string description}} (is (= {{expected}} (difference-of-squares/sum-of-squares {{input.number}}))))) {{/test_cases.sumOfSquares~}} {{#test_cases.differenceOfSquares}} (deftest difference_test_{{idx}} - (testing "{{description}}" + (testing {{string description}} (is (= {{expected}} (difference-of-squares/difference {{input.number}}))))) {{/test_cases.differenceOfSquares~}} diff --git a/exercises/practice/isogram/.meta/generator.tpl b/exercises/practice/isogram/.meta/generator.tpl index d49dc6d34..b21f078c7 100644 --- a/exercises/practice/isogram/.meta/generator.tpl +++ b/exercises/practice/isogram/.meta/generator.tpl @@ -3,6 +3,6 @@ isogram)) {{#test_cases.isIsogram}} (deftest isogram?_test_{{idx}} - (testing "{{description}}" - (is ({{#expected~}}true?{{else}}false?{{/expected}} (isogram/isogram? "{{input.phrase}}"))))) + (testing {{string description}} + (is ({{#expected~}}true?{{else}}false?{{/expected}} (isogram/isogram? {{string input.phrase}}))))) {{/test_cases.isIsogram~}} diff --git a/exercises/practice/pangram/.meta/generator.tpl b/exercises/practice/pangram/.meta/generator.tpl index 2c1b8e41f..772fffe15 100644 --- a/exercises/practice/pangram/.meta/generator.tpl +++ b/exercises/practice/pangram/.meta/generator.tpl @@ -3,6 +3,6 @@ pangram)) {{#test_cases.isPangram}} (deftest pangram?_test_{{idx}} - (testing "{{description}}" + (testing {{string description}} (is ({{#expected}}true?{{else}}false?{{/expected}} (pangram/pangram? {{string input.sentence}}))))) {{/test_cases.isPangram~}} diff --git a/exercises/practice/roman-numerals/.meta/generator.tpl b/exercises/practice/roman-numerals/.meta/generator.tpl index 86bb49d7b..4b01f772c 100644 --- a/exercises/practice/roman-numerals/.meta/generator.tpl +++ b/exercises/practice/roman-numerals/.meta/generator.tpl @@ -3,6 +3,6 @@ roman-numerals)) {{#test_cases.roman}} (deftest numerals_test_{{idx}} - (testing "{{description}}" - (is (= "{{expected}}" (roman-numerals/numerals {{input.number}}))))) + (testing {{string description}} + (is (= {{string expected}} (roman-numerals/numerals {{input.number}}))))) {{/test_cases.roman~}} diff --git a/exercises/practice/scrabble-score/.meta/generator.tpl b/exercises/practice/scrabble-score/.meta/generator.tpl index 81c2569e0..7954c8476 100644 --- a/exercises/practice/scrabble-score/.meta/generator.tpl +++ b/exercises/practice/scrabble-score/.meta/generator.tpl @@ -3,6 +3,6 @@ scrabble-score)) {{#test_cases.score}} (deftest score-word_test_{{idx}} - (testing "{{description}}" - (is (= {{expected}} (scrabble-score/score-word "{{input.word}}"))))) + (testing {{string description}} + (is (= {{expected}} (scrabble-score/score-word {{string input.word}}))))) {{/test_cases.score~}} diff --git a/exercises/practice/two-fer/.meta/generator.tpl b/exercises/practice/two-fer/.meta/generator.tpl index 1ea22939e..cb3a61e55 100644 --- a/exercises/practice/two-fer/.meta/generator.tpl +++ b/exercises/practice/two-fer/.meta/generator.tpl @@ -3,6 +3,6 @@ two-fer)) {{#test_cases.twoFer}} (deftest two-fer_test_{{idx}} - (testing "{{description}}" - (is (= "{{expected}}" (two-fer/two-fer{{#input.name}} "{{input.name}}"{{/input.name}}))))) + (testing {{string description}} + (is (= {{string expected}} (two-fer/two-fer{{#input.name}} {{string input.name}}{{/input.name}}))))) {{/test_cases.twoFer~}}