in reply to Re^2: Stupidest Prime Number detector ever!! (updated)
in thread Stupidest Prime Number detector ever!!
G'day AnomalousMonk,
"The naming convention for SomeModule.pm test code is SomeModule.t. This is not enforced in any way, but it's what everyone expects."
I have never encountered that convention — where have you seen it? I certainly wouldn't expect it; I've mostly seen test files starting with numbers and are all lowercase (e.g. nn-name.t).
A t/ directory I'd create for an OO module might look something like:
00-load.t # test 'use' 01-instantiate.t # test 'new()' 02-some_func.t # test 'some_func()' ... # and so on ...
And, as a real world example, here's part of the output of make test for a $work module I ran in the last hour:
t/00-load.t ............... ok t/01-instantiate.t ........ ok t/02-overload.t ........... ok t/03-validation.t ......... ok ...
Just in case I was having a sudden, and unexpected, mental breakdown, I checked a few arbitrary, but well-known, CPAN modules' t/ directories:
As you can see, for the most part they all follow the same basic naming convention (i.e. number, name, .t). There are a few exceptions (e.g. pod.t) but there are none that look like your SomeModule.t.
— Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Stupidest Prime Number detector ever!! [*.t naming convention]
by eyepopslikeamosquito (Archbishop) on Jun 24, 2021 at 10:48 UTC | |
Re^4: Stupidest Prime Number detector ever!! [*.t naming convention]
by choroba (Cardinal) on Jun 24, 2021 at 12:34 UTC |