Initial commit
[www-passmark.git] / t / WWW-Passmark.t
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::RequiresInternet ('www.cpubenchmark.net' => 443, 'www.videocardbenchmark.net' => 443);
6 use Test::More tests => 10;
7 use List::Util qw/first/;
8
9 BEGIN { use_ok('WWW::Passmark') };
10
11 my $cpu_list = get_cpu_list;
12 my $gpu_list = get_gpu_list;
13
14 my $fx8350 = first { $_->name =~ /AMD FX-8350/i } @$cpu_list;
15 my $rx460 = first { $_->name eq 'Radeon RX 460' } @$gpu_list;
16
17 ok defined $fx8350, 'Found AMD FX-8350 in CPU list';
18 ok defined $rx460, 'Found Radeon RX 460 in GPU list';
19
20 cmp_ok $fx8350->cpumark, '>', 0, 'cpumark is positive';
21 cmp_ok $fx8350->single_thread_mark, '>', 0, 'single_thread_mark is positive';
22 is $fx8350->tdp, 125, 'TDP is correct';
23 is $fx8350->socket, 'AM3+', 'socket is correct';
24
25 cmp_ok $rx460->g3dmark, '>', 0, 'g3dmark is positive';
26 cmp_ok $rx460->g2dmark, '>', 0, 'g2dmark is positive';
27 is $rx460->tdp, 75, 'TDP is correct';
This page took 0.024017 seconds and 4 git commands to generate.