Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isogram: add generator template #732

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ErikSchierboom
Copy link
Member

@ErikSchierboom ErikSchierboom commented Jan 11, 2025

Should be merged after #728 is merged

Copy link
Member

@tasxatzial tasxatzial left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be going over the exercises first.

@@ -0,0 +1,13 @@
(ns isogram-test
(:require [clojure.test :refer [deftest testing is]]
isogram))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without brackets, the first letter is typically aligned with the bracket above

Suggested change
isogram))
isogram))

isogram))

{{#test_cases.isIsogram~}}
(deftest isogram_test_{{idx}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(deftest isogram_test_{{idx}}
(deftest isogram?_test_{{idx}}

(deftest isogram_test_{{idx}}
(testing "{{description}}"
{{#expected~}}
(is (isogram/isogram? "{{input.phrase}}"))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(is (isogram/isogram? "{{input.phrase}}"))))
(is (true? (isogram/isogram? "{{input.phrase}}")))))

{{#expected~}}
(is (isogram/isogram? "{{input.phrase}}"))))
{{else~}}
(is (not (isogram/isogram? "{{input.phrase}}")))))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(is (not (isogram/isogram? "{{input.phrase}}")))))
(is (false? (isogram/isogram? "{{input.phrase}}")))))

Copy link
Member

@tasxatzial tasxatzial Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also a newline at the end of the template, but I'm guessing you did not want to include one?

Edit: there's also a generators/.problem-specifications directory.

@tasxatzial
Copy link
Member

I'm seeing the issue with the line trimming on this one. How difficult would be to do post-processing? (it looks a bit clunky as a solution). Personally I'm ok with the extra spaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants