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

vadzimz_homework_8 #37

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

vadzimz_homework_8 #37

wants to merge 36 commits into from

Conversation

Vadzimz
Copy link

@Vadzimz Vadzimz commented May 5, 2024

No description provided.

(deftest test-get-idx
(testing "legal args"
(are [a b] (= b (#'sut/get-idx a))
8448 136.0 4944 79.0 5310 85.0 9626 155.0 5217 84.0))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Я бы поместил каждую пару на отдельную строку для большей читабельности

Comment on lines +10 to +12
(is (thrown? ClassCastException (#'sut/get-idx "8448")))
(is (thrown? ClassCastException (#'sut/get-idx [8448])))
(is (thrown? ClassCastException (#'sut/get-idx {:i 8448})))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Почему бы не поместить их в are?

(is (thrown? ClassCastException (#'sut/get-idx [8448])))
(is (thrown? ClassCastException (#'sut/get-idx {:i 8448})))))

(deftest test-get-character-by-idx
Copy link
Collaborator

Choose a reason for hiding this comment

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

кажется здесь не хватает 0 как граничного значения

(is (thrown? ClassCastException (#'sut/get-character-by-idx {:i 5047})))
(is (nil? (#'sut/get-character-by-idx -5047)))))

(deftest test-int->id
Copy link
Collaborator

Choose a reason for hiding this comment

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

аналогично, я бы здесь добавил тест на 0

(is (thrown? ClassCastException (sut/int->id {:int 56544447})))
(is (empty? (sut/int->id -56544447)))))

(deftest test-id->int
Copy link
Collaborator

Choose a reason for hiding this comment

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

А здесь в качестве граничного значения не помешала бы пустая строка.

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