<commit_before><?php
/**
 *
 * @filesource   PolynomialTest.php
 * @created      09.02.2016
 * @package      chillerlan\QRCodeTest
 * @author       Smiley <<EMAIL>>
 * @copyright    2015 Smiley
 * @license      MIT
 */

namespace chillerlan\QRCodeTest;

use chillerlan\QRCode\Polynomial;

class PolynomialTest extends \PHPUnit_Framework_TestCase{

	/**
	 * @var \chillerlan\QRCode\Polynomial
	 */
	protected $polynomial;

	protected function setUp(){
		$this->polynomial = new Polynomial;
	}

	/**<commit_msg>added gexp() test<commit_after><?php
/**
 *
 * @filesource   PolynomialTest.php
 * @created      09.02.2016
 * @package      chillerlan\QRCodeTest
 * @author       Smiley <<EMAIL>>
 * @copyright    2015 Smiley
 * @license      MIT
 */

namespace chillerlan\QRCodeTest;

use chillerlan\QRCode\Polynomial;

class PolynomialTest extends \PHPUnit_Framework_TestCase{

	/**
	 * @var \chillerlan\QRCode\Polynomial
	 */
	protected $polynomial;

	protected function setUp(){
		$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));
	}

	/**
{'fraction_non_alphanumeric': 0.14076484947111473, 'fraction_numerical': 0.030919446704637917, 'mean_word_length': 3.641509433962264, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6167667', 'n_tokens_mistral': 469, 'n_tokens_neox': 422, 'n_words': 78}