Skip to content

Provide explicit undef to indicate TODO condition is not met #30

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

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

Conversation

jkeenan
Copy link

@jkeenan jkeenan commented Jan 20, 2019

... rather than implicit empty string (false but defined).

Reflects change in Test-Simple distribution 1.302160, which is now
incorporated into perl-5.29.7.

See: Test-More/test-more@9c269ff

... rather than implicit empty string (false but defined).

Reflects change in Test-Simple distribution 1.302160, which is now
incorporated into perl-5.29.7.

See: Test-More/test-more@9c269ff
isa_ok($got, 'version') or $errs++ if defined $expected_version;
}

if (ref($expected_version) eq 'CODE') {
local $TODO = $test_case->{TODO_code_sub};
local $TODO = $test_case->{TODO_code_sub} || undef;
Copy link
Member

Choose a reason for hiding this comment

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

This line shouldn't need to be changed - $test_case->{TODO_code_sub} is never defined-but-false.

ok(
$expected_version->($got),
"case '$test_case->{name}': module version passes match sub"
)
or $errs++;
}
else {
local $TODO = $test_case->{TODO_scalar};
local $TODO = $test_case->{TODO_scalar} || undef;
Copy link
Member

Choose a reason for hiding this comment

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

same as TODO_code_sub.

@@ -673,7 +673,7 @@ foreach my $test_case (@modules) {
}

if (exists $test_case->{all_versions}) {
local $TODO = $test_case->{TODO_all_versions};
local $TODO = $test_case->{TODO_all_versions} || undef;
Copy link
Member

Choose a reason for hiding this comment

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

same as TODO_code_sub.

@@ -648,20 +648,20 @@ foreach my $test_case (@modules) {
# We want to ensure we preserve the original, as long as it's legal, so we
# explicitly check the stringified form.
{
local $TODO = !defined($got) && ($test_case->{TODO_code_sub} || $test_case->{TODO_scalar});
local $TODO = !defined($got) && ($test_case->{TODO_code_sub} || $test_case->{TODO_scalar}) || undef;
Copy link
Member

Choose a reason for hiding this comment

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

This is more strict than the original, but if the change is consequential it will result in more tests failing due to a lack of a TODO_* where there should be one, so it should make the problem more apparent. (That is, I think this change is not harmful.)

Copy link
Member

@karenetheridge karenetheridge left a comment

Choose a reason for hiding this comment

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

Please add an entry to Changes, as per the travis failures.

@jkeenan
Copy link
Author

jkeenan commented Jan 20, 2019 via email

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