<commit_before>var WordProblem   = require('./wordy').WordProblem;
var ArgumentError = require('./wordy').ArgumentError;

describe('Word Problem', function() {

  it('add 1', function() {
    var question = 'What is 1 plus 1?';
    expect(2).toEqual(new WordProblem(question).answer());
  });

  xit('add 2', function() {
    var question = 'What is 53 plus 2?';
    expect(55).toEqual(new WordProblem(question).answer());
  });

  xit('add negative numbers', function() {
    var question = 'What is -1 plus -10?';
    expect(-11).toEqual(new WordProblem(question).answer());
  });

  xit('add more digits', function() {
    var question = 'What is 123 plus 45678?';
    expect(45801).toEqual(new WordProblem(question).answer());
  });

  xit('subtract', function() {
    var question = 'What is 4 minus -12?';
    expect(16).toEqual(new WordProblem(question).answer());
  });

  xit('multiply', function() {
    var question = 'What is -3 multiplied by 25?';
    expect(-75).toEqual(new WordProblem(question).answer());
  });

  xit('divide', function() {
    var question = 'What is 33 divided by -3?';
    expect(-11).toEqual(new WordProblem(question).answer());
  });

  xit('add twice', function() {
    var question = 'What is 1 plus 1 plus 1?';
    expect(3).toEqual(new WordProblem(question).answer());
  });

  xit('add then subtract', function() {
    var question = 'What is 1 plus 5 minus -2?';
    expect(8).toEqual(new WordProblem(question).answer());
  });

  xit('subtract twice', function() {
    var question = 'What is 20 minus 4 minus 13?';
    expect(3).toEqual(new WordProblem(question).answer());
  });

  xit('subtract then add', function() {
    var question = 'What is 17 minus 6 plus 3?';
    expect(14).toEqual(new WordProblem(question).answer());
  });

  xit('multiply twice', function() {
    var question = 'What is 2 multiplied by -2 multiplied by 3?';
    expect(-12).toEqual(new WordProblem(question).answer());
  });

  xit('add then multiply', function() {
    var question = 'What is -3 plus 7 multiplied by -2?';
    expect(-8).toEqual(new WordProblem(question).answer());
  });

  xit('divide twice', function() {
    var question = 'What is -12 divided by 2 divided by -3?';
    expect(2).toEqual(new WordProblem(question).answer());
  });

  xit('too advanced', function() {
    var question = 'What is 53 cubed?';
    var problem  = new WordProblem(question);

    expect(problem.answer.bind(problem)).toThrow(new ArgumentError());
  });

  xit('irrelevant', function() {
    var question = 'Who is the president of the United States?';
    var problem  = new WordProblem(question);

    expect(problem.answer.bind(problem)).toThrow(new ArgumentError());<commit_msg>wordy: fix ordering of actual/expected<commit_after>var WordProblem   = require('./wordy').WordProblem;
var ArgumentError = require('./wordy').ArgumentError;

describe('Word Problem', function() {

  it('add 1', function() {
    var question = 'What is 1 plus 1?';
    expect(new WordProblem(question).answer()).toEqual(2);
  });

  xit('add 2', function() {
    var question = 'What is 53 plus 2?';
    expect(new WordProblem(question).answer()).toEqual(55);
  });

  xit('add negative numbers', function() {
    var question = 'What is -1 plus -10?';
    expect(new WordProblem(question).answer()).toEqual(-11);
  });

  xit('add more digits', function() {
    var question = 'What is 123 plus 45678?';
    expect(new WordProblem(question).answer()).toEqual(45801);
  });

  xit('subtract', function() {
    var question = 'What is 4 minus -12?';
    expect(new WordProblem(question).answer()).toEqual(16);
  });

  xit('multiply', function() {
    var question = 'What is -3 multiplied by 25?';
    expect(new WordProblem(question).answer()).toEqual(-75);
  });

  xit('divide', function() {
    var question = 'What is 33 divided by -3?';
    expect(new WordProblem(question).answer()).toEqual(-11);
  });

  xit('add twice', function() {
    var question = 'What is 1 plus 1 plus 1?';
    expect(new WordProblem(question).answer()).toEqual(3);
  });

  xit('add then subtract', function() {
    var question = 'What is 1 plus 5 minus -2?';
    expect(new WordProblem(question).answer()).toEqual(8);
  });

  xit('subtract twice', function() {
    var question = 'What is 20 minus 4 minus 13?';
    expect(new WordProblem(question).answer()).toEqual(3);
  });

  xit('subtract then add', function() {
    var question = 'What is 17 minus 6 plus 3?';
    expect(new WordProblem(question).answer()).toEqual(14);
  });

  xit('multiply twice', function() {
    var question = 'What is 2 multiplied by -2 multiplied by 3?';
    expect(new WordProblem(question).answer()).toEqual(-12);
  });

  xit('add then multiply', function() {
    var question = 'What is -3 plus 7 multiplied by -2?';
    expect(new WordProblem(question).answer()).toEqual(-8);
  });

  xit('divide twice', function() {
    var question = 'What is -12 divided by 2 divided by -3?';
    expect(new WordProblem(question).answer()).toEqual(2);
  });

  xit('too advanced', function() {
    var question = 'What is 53 cubed?';
    var problem  = new WordProblem(question);

    expect(problem.answer.bind(problem)).toThrow(new ArgumentError());
  });

  xit('irrelevant', function() {
    var question = 'Who is the president of the United States?';
    var problem  = new WordProblem(question);

    expect(problem.answer.bind(problem)).toThrow(new ArgumentError());
{'fraction_non_alphanumeric': 0.171900826446281, 'fraction_numerical': 0.02901744719926538, 'mean_word_length': 3.828014184397163, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3490613', 'n_tokens_mistral': 1829, 'n_tokens_neox': 1614, 'n_words': 469}