Skip to content

Luhn: Update to v1.4.0 #348

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

Merged
merged 1 commit into from
Dec 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion exercises/luhn/uLuhnTest.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface
DUnitX.TestFramework;

const
CanonicalVersion = '1.3.0';
CanonicalVersion = '1.4.0';

type

Expand Down Expand Up @@ -48,6 +48,10 @@ TLuhnTest = class(TObject)
[Ignore]
procedure valid_strings_with_a_non_digit_included_become_invalid;

[Test]
[Ignore]
procedure valid_strings_with_a_non_digit_added_at_the_end_become_invalid;

[Test]
[Ignore]
procedure valid_strings_with_punctuation_included_become_invalid;
Expand Down Expand Up @@ -138,6 +142,11 @@ procedure TLuhnTest.valid_number_with_an_even_number_of_digits;
Assert.AreEqual(true, TLuhn.Valid('095 245 88'));
end;

procedure TLuhnTest.valid_strings_with_a_non_digit_added_at_the_end_become_invalid;
begin
Assert.AreEqual(false, TLuhn.Valid('059a'));
end;

procedure TLuhnTest.valid_strings_with_a_non_digit_included_become_invalid;
begin
Assert.AreEqual(false, TLuhn.Valid('055a 444 285'));
Expand Down