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

Remove non-working/obsolete tests? #533

Open
JJ opened this issue May 1, 2019 · 4 comments
Open

Remove non-working/obsolete tests? #533

JJ opened this issue May 1, 2019 · 4 comments

Comments

@JJ
Copy link
Contributor

JJ commented May 1, 2019

While looking at #532 I've realized this it's 8 years old, and that the last commit, itself, says it does not work in nom.
Wouldn't it be a good idea to simply remove tests that are not working? Or fix them? Isn't this spec supposed to be the spec?

@JJ
Copy link
Contributor Author

JJ commented May 1, 2019

Effectively, that file (along with packages.t is not listed in spectest.data in Rakudo). But that's confusing, and it also means that variable traits are not tested. Is that correct?

@JJ
Copy link
Contributor Author

JJ commented May 10, 2020

Ping?
Here's my version of that test, before I obliterate it

use v6;
use Test;

plan 5;

# L<S14/Traits/>

my @var_names;
multi trait_mod:<is>(Variable $a, :$noted!) {
    push @var_names, $a.name;
}

role doc { has $.doc is rw }
# multi trait_mod:<is>($a, $arg, :$doc!) {
#     $a.container.VAR does doc.new(doc => $arg);
# }

multi trait_mod:<is>(Variable $a, :$docced!) {
    $a does doc.new(doc => $docced);
}


my $a is noted;
my %b is noted;
my @c is noted;

@var_names .= sort;
is +@var_names, 3, 'have correct number of names noted from trait applied by name';
is @var_names, ['$a','%b','@c'], 'trait recorded correct information';


my $dog is docced('barks');
my @birds is docced('tweet');
my %cows is docced('moooo');

say $dog.^name;
is $dog.VAR.doc, 'barks', 'trait applied to scalar variable correctly';
is @birds.doc,   'tweet', 'trait applied to array variable correctly';
is %cows.doc,    'moooo', 'trait applied to hash variable correctly';

# vim: ft=perl6

@Altai-man
Copy link
Member

1)What can "obsolete" mean here? I mean, what's the criteria?
2)If we have tests which are broken, they have to be fixed, not removed. If we have tests which test NYI, we have to implement, not remove tests

@JJ
Copy link
Contributor Author

JJ commented May 10, 2020

I mainly mean tests that are not part of the spec, and thus they are not run. This is one of them.

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

No branches or pull requests

2 participants