Skip to content
This repository has been archived by the owner on Jan 23, 2022. It is now read-only.

Test cleanup 3 #7

Merged
merged 1 commit into from Aug 29, 2015
Merged

Test cleanup 3 #7

merged 1 commit into from Aug 29, 2015

Conversation

zmughal
Copy link
Member

@zmughal zmughal commented Aug 29, 2015

PDLA version of PDLPorters/pdl#109.

@mohawk2
Copy link
Member

mohawk2 commented Aug 29, 2015

Great work! Aye.

@zmughal zmughal force-pushed the test-cleanup-3 branch 2 times, most recently from ef2e045 to b5f78a3 Compare August 29, 2015 19:40
 - place all the eval { require ... } or plan skip_all in BEGIN {} blocks

 - using `Test::More` module (no hand-rolled TAP or `Test` module)

 - `use strict; use warnings` everywhere

 - remove use of `$a`, `$b` lexicals (reserved for `sort` function)

 - using `Test::Exception` (lives_ok, dies_ok, etc.) rather than the `eval { $code }; ok $@` combination

 - make each individual test run in its own scope
   e.g.
   ```perl
   {
 	my $test = ...
 	ok( ... );
   }
   {
 	my $test = ...
 	ok( ... );
   }
   ```
   This makes tests not dependent on previous code which means that they can be
   moved around without worrying about state. In the future, these should be setup
   as labelled subtests.

 - Using `all approx( ... )` instead of a custom `tapprox( ... )` in each file.

 - update TODO to remove the test refactoring items
@zmughal
Copy link
Member Author

zmughal commented Aug 29, 2015

This should be good to go now that I TODO'd the approx tests in lut.t, right? Want to wait for the CI to be green?

@mohawk2
Copy link
Member

mohawk2 commented Aug 29, 2015

I don't. Storm in!

@zmughal zmughal merged commit e8f31ef into master Aug 29, 2015
@mohawk2 mohawk2 deleted the test-cleanup-3 branch August 29, 2015 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants