<commit_before><?php

chdir(dirname(__FILE__));
chdir('..');

define('PHPUNIT_TESTING', TRUE);

include 'config.php';
include 'constants.php';
include 'autoloader.php';


class ScoringTest extends PHPUnit_Framework_TestCase
{

  function testProvider()
  {
    return array(
        /* singles: 2x init scores, 2x init nb sets, 2x result scores */
        array(ID_SET_TYPE_MEN_SINGLES,     0, 'NULL', 0, 'NULL',     0, 'NULL', 0, 'NULL',     10, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_WOMEN_SINGLES,   0, 'NULL', 0, 'NULL',     1, 'NULL', 0, 'NULL',     5, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_MEN_SINGLES,     10, 'NULL', 0, 'NULL',    1, 'NULL', 1, 'NULL',     10, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_WOMEN_SINGLES,   5, 'NULL', 5, 'NULL',     2, 'NULL', 2, 'NULL',     8.33, 'NULL', 3.33, 'NULL'),
        
        
        /* doubles: 4x init scores, 4x init nb sets, 4x result scores */
        array(ID_SET_TYPE_MIXED_DOUBLES,   0, 0, 0, 0,            0, 0, 0, 0,   10, 10, 0, 0),
        array(ID_SET_TYPE_MEN_DOUBLES,     10, 0, 0, 0,           1, 1, 1, 0,   10, 5,  0, 0),
        array(ID_SET_TYPE_WOMEN_DOUBLES,   0, 5, 10, 0,           0, 2, 2, 2,   15, 8.33, 6.67, 0),
        array(ID_SET_TYPE_MIXED_DOUBLES,   15, 6.67, 0, 8.33,     1, 3, 3, 3,   15, 8.54, 0, 6.46),
      );<commit_msg>fix test file 'bootstrap' to be able to run on Travis even if config.php is missing<commit_after><?php

chdir(dirname(__FILE__));
chdir('..');

define('PHPUNIT_TESTING', TRUE);

if (file_exists('config.php'))
  include 'config.php';
else
  include 'config.php.sample'; // for Travis CI

include 'constants.php';
include 'autoloader.php';


class ScoringTest extends PHPUnit_Framework_TestCase
{

  function testProvider()
  {
    return array(
        /* singles: 2x init scores, 2x init nb sets, 2x result scores */
        array(ID_SET_TYPE_MEN_SINGLES,     0, 'NULL', 0, 'NULL',     0, 'NULL', 0, 'NULL',     10, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_WOMEN_SINGLES,   0, 'NULL', 0, 'NULL',     1, 'NULL', 0, 'NULL',     5, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_MEN_SINGLES,     10, 'NULL', 0, 'NULL',    1, 'NULL', 1, 'NULL',     10, 'NULL', 0, 'NULL'),
        array(ID_SET_TYPE_WOMEN_SINGLES,   5, 'NULL', 5, 'NULL',     2, 'NULL', 2, 'NULL',     8.33, 'NULL', 3.33, 'NULL'),
        
        
        /* doubles: 4x init scores, 4x init nb sets, 4x result scores */
        array(ID_SET_TYPE_MIXED_DOUBLES,   0, 0, 0, 0,            0, 0, 0, 0,   10, 10, 0, 0),
        array(ID_SET_TYPE_MEN_DOUBLES,     10, 0, 0, 0,           1, 1, 1, 0,   10, 5,  0, 0),
        array(ID_SET_TYPE_WOMEN_DOUBLES,   0, 5, 10, 0,           0, 2, 2, 2,   15, 8.33, 6.67, 0),
        array(ID_SET_TYPE_MIXED_DOUBLES,   15, 6.67, 0, 8.33,     1, 3, 3, 3,   15, 8.54, 0, 6.46),
      );
{'fraction_non_alphanumeric': 0.1708703374777975, 'fraction_numerical': 0.07460035523978685, 'mean_word_length': 2.511221945137157, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '2447892', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1122, 'n_words': 313}