1#! /usr/local/perl -w
2# Before `make install' is performed this script should be runnable with
3# `make test'. After `make install' it should work as `perl test.pl'
4
5#########################
6
7use Test::More qw/no_plan/;
8
9BEGIN {
10    use_ok('version', 0.9924);
11}
12
13my $v1 = version->new('1.2');
14eval {$v1 = $v1 + 1};
15like $@, qr/operation not supported with version object/, 'No math ops with version objects';
16eval {$v1 = $v1 - 1};
17like $@, qr/operation not supported with version object/, 'No math ops with version objects';
18eval {$v1 = $v1 / 1};
19like $@, qr/operation not supported with version object/, 'No math ops with version objects';
20eval {$v1 = $v1 * 1};
21like $@, qr/operation not supported with version object/, 'No math ops with version objects';
22eval {$v1 = abs($v1)};
23like $@, qr/operation not supported with version object/, 'No math ops with version objects';
24
25eval {$v1 += 1};
26like $@, qr/operation not supported with version object/, 'No math ops with version objects';
27eval {$v1 -= 1};
28like $@, qr/operation not supported with version object/, 'No math ops with version objects';
29eval {$v1 /= 1};
30like $@, qr/operation not supported with version object/, 'No math ops with version objects';
31eval {$v1 *= 1};
32like $@, qr/operation not supported with version object/, 'No math ops with version objects';
33