From 0fa4cb99554008d229834423afa0550065e11028 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 22 Apr 2016 13:36:13 -0700 Subject: Import original source of Map-Splat 0.01 --- t/00-load.t | 13 +++++++++++++ t/manifest.t | 15 +++++++++++++++ t/splat.t | 29 +++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 t/00-load.t create mode 100644 t/manifest.t create mode 100644 t/splat.t (limited to 't') diff --git a/t/00-load.t b/t/00-load.t new file mode 100644 index 0000000..fa5caa5 --- /dev/null +++ b/t/00-load.t @@ -0,0 +1,13 @@ +#!perl -T +use 5.006; +use strict; +use warnings FATAL => 'all'; +use Test::More; + +plan tests => 1; + +BEGIN { + use_ok( 'Map::Splat' ) || print "Bail out!\n"; +} + +diag( "Testing Map::Splat $Map::Splat::VERSION, Perl $], $^X" ); diff --git a/t/manifest.t b/t/manifest.t new file mode 100644 index 0000000..6ddfe36 --- /dev/null +++ b/t/manifest.t @@ -0,0 +1,15 @@ +#!perl -T +use 5.006; +use strict; +use warnings FATAL => 'all'; +use Test::More; + +unless ( $ENV{RELEASE_TESTING} ) { + plan( skip_all => "Author tests not required for installation" ); +} + +my $min_tcm = 0.9; +eval "use Test::CheckManifest $min_tcm"; +plan skip_all => "Test::CheckManifest $min_tcm required" if $@; + +ok_manifest(); diff --git a/t/splat.t b/t/splat.t new file mode 100644 index 0000000..53dcac2 --- /dev/null +++ b/t/splat.t @@ -0,0 +1,29 @@ +#!perl +use 5.006; +use strict; +use warnings FATAL => 'all'; +use Test::More; + +plan tests => 2; + +use Map::Splat; +my $map = Map::Splat->new( + lon => -122.279, + lat => 37.939, + height => 300, + freq => 2460, + azimuth => 200, + h_width => 180, + v_width => 20, + tilt => 2, + max_loss => 180, + min_loss => 30, +); +$map->calculate; +ok( defined $map->box, 'bounding box exists' ); +ok( defined $map->png, 'PNG generated' ); + +$map->image->Write('splat.png'); +use File::Slurp 'write_file'; +write_file 'mask.png', $map->mask; + -- cgit v1.2.1