Writing Tests

General information on using the PerlUnit framework can be found in the Test::Unit man page. Information on writing individual test cases can be found in the Test::Unit::TestCase man page.

Tests for individual modules should be defined in tests::moduleTest package. You can omit the Lire:: prefix and you can inline intermediary package names. For example, the unit tests of the Lire::ExtendedDlfSchema module are in the tests::ExtendedDlfSchemaTest package and the tests of the Lire::AsciiDlf::Timegroup module are in the tests::AsciiDlfTimegroupTest package.

The Lire::Tests namespace is reserved for extensions to the PerlUnit framework that will be used to provide “fixtures” and “assertions” that are of general use for common Lire extensions.

Note

This section will be expanded as common patterns for writing unit test for DLF converters, analyzers and other common Lire extension are developped.