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