Skip to content

Commit

Permalink
【autopack测试脚本】
Browse files Browse the repository at this point in the history
更新比对脚本
  • Loading branch information
wangfangguo01 committed Aug 4, 2014
1 parent ff24781 commit b39a9eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/util/autopack/TestStaticPack.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ class TestStaticPack{
private $fileData1;
private $fileData2;
private $data;
private $rate;
function __construct(){
$this->rate=0;
$this->data['fail'] = array();
}
public function setFile($file1,$file2){
$this->fileData1=$file1;
$this->fileData2=$file2;
$this->data['fail'] = array();
}
private function getJsonData($filePath){
$fileData=file_get_contents($filePath);
Expand Down Expand Up @@ -71,15 +69,17 @@ private function calculate($data1,$data2){
unset($outdata);
}
}

public function getResult(){
$this->rate=$this->calculate($this->fileData1,$this->fileData2);
$this->calculate($this->fileData1,$this->fileData2);
$this->data["name"]="autopack";
return $this->rate;
}
public function getData(){
return $this->data;
}
};

$case=new TestStaticPack();
$case->setFile("a.txt","b.txt");
$case->getResult();
Expand Down

0 comments on commit b39a9eb

Please sign in to comment.