Files
EasySoft-ZenTaoPMS/test/model/weekly/getcv.php
T
2022-05-07 08:37:36 +08:00

38 lines
1.5 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/weekly.class.php';
su('admin');
/**
title=测试 weeklyModel->getCV();
cid=1
pid=1
测试ev值为0ac值为0 >> 0
测试ev值为0ac值为10 >> -100.00
测试ev值为0ac值为100 >> -100.00
测试ev值为10ac值为0 >> 0
测试ev值为10ac值为10 >> 0.00
测试ev值为10ac值为100 >> -90.00
测试ev值为100ac值为0 >> 0
测试ev值为100ac值为10 >> 900.00
测试ev值为100ac值为100 >> 0.00
*/
$evList = array(0, 10, 100);
$acList = array(0, 10, 100);
$weekly = new weeklyTest();
r($weekly->getCVTest($evList[0], $acList[0])) && p() && e('0'); //测试ev值为0ac值为0
r($weekly->getCVTest($evList[0], $acList[1])) && p() && e('-100.00'); //测试ev值为0ac值为10
r($weekly->getCVTest($evList[0], $acList[2])) && p() && e('-100.00'); //测试ev值为0ac值为100
r($weekly->getCVTest($evList[1], $acList[0])) && p() && e('0'); //测试ev值为10ac值为0
r($weekly->getCVTest($evList[1], $acList[1])) && p() && e('0.00'); //测试ev值为10ac值为10
r($weekly->getCVTest($evList[1], $acList[2])) && p() && e('-90.00'); //测试ev值为10ac值为100
r($weekly->getCVTest($evList[2], $acList[0])) && p() && e('0'); //测试ev值为100ac值为0
r($weekly->getCVTest($evList[2], $acList[1])) && p() && e('900.00'); //测试ev值为100ac值为10
r($weekly->getCVTest($evList[2], $acList[2])) && p() && e('0.00'); //测试ev值为100ac值为100