Commits

Toby Inkster committed 278e8d4

pod for test cases

  • Participants
  • Parent commits fa1ecff

Comments (0)

Files changed (8)

+=head1 PURPOSE
+
+Test that JSON::Schema compiles.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2010-2012 Toby Inkster.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use Test::More tests => 1;
 BEGIN { use_ok('JSON::Schema') };
 

File t/02integer.t

+=head1 PURPOSE
+
+Various tests validating integers - mostly maxima and minima.
+
+=cut
+
 use Test::More;
 use strict;
 use warnings;

File t/03required.t

+=head1 PURPOSE
+
+Testing required versus optional properties.
+
+=cut
+
 use Test::More;
 use strict;
 use warnings;

File t/04format.t

+=head1 PURPOSE
+
+Test that the C<format> option can be used to define custom validation
+criteria.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2011-2012 Toby Inkster.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use Test::More tests => 4;
 use strict;
 use warnings;
 		type => 'object',
 		properties => {
 			mydate => { format => 'date-time' }
-			},
 		},
+	},
 	format => {
-		'date-time'  => sub {
+		'date-time' => sub {
 			ok(1, 'callback fired');
 			$_[0] =~ /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/i;
-			}
-		});
+		}
+	}
+);
 
 my $result;
 
+=head1 PURPOSE
+
+Test that schema unions work.
+
+=head1 SEE ALSO
+
+L<https://rt.cpan.org/Ticket/Display.html?id=80083>.
+
+=head1 AUTHOR
+
+DAVIDIAM
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2012 DAVIDIAM.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use Test::More;
 use strict;
 use warnings;

File t/06lengths.t

+=head1 PURPOSE
+
+Test that minLength and maxLength work.
+
+=head1 SEE ALSO
+
+L<https://rt.cpan.org/Ticket/Display.html?id=81736>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2012 Toby Inkster.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use strict;
 use warnings;
 use Test::More;

File t/rt-76892.t

+=head1 PURPOSE
+
+Test that an empty C<additionalProperties> is a no-op.
+
+=head1 SEE ALSO
+
+L<https://rt.cpan.org/Ticket/Display.html?id=76892>.
+
+=head1 AUTHOR
+
+pp at idea7 dot pl
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2012 pp at idea7 dot pl.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use Test::More tests => 2;
 use JSON::Schema;
 

File t/rt-76944.t

+=head1 PURPOSE
+
+Test that a false C<additionalProperties> forbids additional properties.
+
+=head1 SEE ALSO
+
+L<https://rt.cpan.org/Ticket/Display.html?id=76944>.
+
+=head1 AUTHOR
+
+sdevoid at gmail dot com
+
+=head1 COPYRIGHT AND LICENCE
+
+Copyright 2012 sdevoid at gmail dot com.
+
+This file is tri-licensed. It is available under the X11 (a.k.a. MIT)
+licence; you can also redistribute it and/or modify it under the same
+terms as Perl itself.
+
+=cut
+
 use strict;
 use Test::More tests => 1;
 use JSON::Schema;