فهرست منبع

added gexp() test

smiley 10 سال پیش
والد
کامیت
123cbd3043
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      tests/PolynomialTest.php

+ 6 - 0
tests/PolynomialTest.php

@@ -24,6 +24,12 @@ class PolynomialTest extends \PHPUnit_Framework_TestCase{
 		$this->polynomial = new Polynomial;
 		$this->polynomial = new Polynomial;
 	}
 	}
 
 
+	public function testGexp(){
+		$this->assertEquals(142, $this->polynomial->gexp( -1));
+		$this->assertEquals(133, $this->polynomial->gexp(128));
+		$this->assertEquals(2,   $this->polynomial->gexp(256));
+	}
+
 	/**
 	/**
 	 * @expectedException \chillerlan\QRCode\QRCodeException
 	 * @expectedException \chillerlan\QRCode\QRCodeException
 	 * @expectedExceptionMessage log(0)
 	 * @expectedExceptionMessage log(0)