Skip to content

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