<commit_before>var CustomSet = require('./custom-set');

describe('CustomSet', function() {

  xit('can test for no members', function() {
    var actual = new CustomSet().empty();
    expect(actual).toBe(true);

    var actual2 = new CustomSet([1]).empty();
    expect(actual2).toBe(false);
  });

  xit('can test for a member', function() {
    var actual = new CustomSet().contains(1);
    expect(actual).toBe(false);

    var actual2 = new CustomSet([1, 2, 3]).contains(1);
    expect(actual2).toBe(true);

    var actual3 = new CustomSet([1, 2, 3]).contains(4);
    expect(actual3).toBe(false);
  });

  xit('can test for subsets', function() {
    var actual = new CustomSet().subset(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet([1]).subset(new CustomSet());
    expect(actual2).toBe(true);

    var actual3 = new CustomSet().subset(new CustomSet([1]));
    expect(actual3).toBe(false);

    var actual4 = new CustomSet([1, 2, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual4).toBe(true);

    var actual5 = new CustomSet([4, 1, 2, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual5).toBe(true);

    var actual6 = new CustomSet([4, 1, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual6).toBe(false);
  });

  xit('can test disjoint', function() {
    var actual = new CustomSet().disjoint(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet().disjoint(new CustomSet([1]));
    expect(actual2).toBe(true);

    var actual3 = new CustomSet([1]).disjoint(new CustomSet());
    expect(actual3).toBe(true);

    var actual4 = new CustomSet([1, 2]).disjoint(new CustomSet([2, 3]));
    expect(actual4).toBe(false);

    var actual5 = new CustomSet([1, 2]).disjoint(new CustomSet([3, 4]));
    expect(actual5).toBe(true);
  });

  xit('can test for equality', function () {
    var actual = new CustomSet().eql(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet().eql(new CustomSet([1, 2, 3]));
    expect(actual2).toBe(false);

    var actual3 = new CustomSet([1, 2, 3]).eql(new CustomSet());
    expect(actual3).toBe(false);

    var actual4 = new CustomSet([1, 2]).eql(new CustomSet([2, 1]));
    expect(actual4).toBe(true);

    var actual5 = new CustomSet([1, 2, 3]).eql(new CustomSet([1, 2, 4]));
    expect(actual5).toBe(false);
  });

  xit('can add a member', function() {
    var actual = new CustomSet().add(3);
    var expected = new CustomSet([3]);
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet([1, 2, 4]).add(3);
    var expected2 = new CustomSet([1, 2, 3, 4]);
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3]).add(3);
    var expected3 = new CustomSet([1, 2, 3]);
    expect(actual3.eql(expected3)).toBe(true);
  });

  xit('can check for intersection', function() {
    var actual = new CustomSet().intersection(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().intersection(new CustomSet([3, 2, 5]));
    var expected2 = new CustomSet();
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3, 4]).intersection(new CustomSet());
    var expected3 = new CustomSet();
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([1, 2, 3]).intersection(new CustomSet([4, 5, 6]));
    var expected4 = new CustomSet();
    expect(actual4.eql(expected4)).toBe(true);

    var actual5 = new CustomSet([1, 2, 3, 4]).intersection(new CustomSet([3, 2, 5]));
    var expected5 = new CustomSet([2, 3]);
    expect(actual5.eql(expected5)).toBe(true);
  });

  xit('can check for difference', function(){
    var actual = new CustomSet().difference(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().difference(new CustomSet([3, 2, 5]));
    var expected2 = new CustomSet();
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3, 4]).difference(new CustomSet());
    var expected3 = new CustomSet([1, 2, 3, 4]);
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([3, 2, 1]).difference(new CustomSet([2, 4]));
    var expected4 = new CustomSet([1, 3]);
    expect(actual4.eql(expected4)).toBe(true);
  });

  xit('can test for union', function() {
    var actual = new CustomSet().union(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().union(new CustomSet([2]));
    var expected2 = new CustomSet([2]);
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 3]).union(new CustomSet());
    var expected3 = new CustomSet([1, 3]);
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([1, 3]).union(new CustomSet([2, 3]));
    var expected4 = new CustomSet([3, 2, 1]);
    expect(actual4.eql(expected4)).toBe(true);
  });

  it('can delete elements', function(){
    var expected = new CustomSet([1, 3]);<commit_msg>custom-set: correct initially enabled test<commit_after>var CustomSet = require('./custom-set');

describe('CustomSet', function() {

  it('can test for no members', function() {
    var actual = new CustomSet().empty();
    expect(actual).toBe(true);

    var actual2 = new CustomSet([1]).empty();
    expect(actual2).toBe(false);
  });

  xit('can test for a member', function() {
    var actual = new CustomSet().contains(1);
    expect(actual).toBe(false);

    var actual2 = new CustomSet([1, 2, 3]).contains(1);
    expect(actual2).toBe(true);

    var actual3 = new CustomSet([1, 2, 3]).contains(4);
    expect(actual3).toBe(false);
  });

  xit('can test for subsets', function() {
    var actual = new CustomSet().subset(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet([1]).subset(new CustomSet());
    expect(actual2).toBe(true);

    var actual3 = new CustomSet().subset(new CustomSet([1]));
    expect(actual3).toBe(false);

    var actual4 = new CustomSet([1, 2, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual4).toBe(true);

    var actual5 = new CustomSet([4, 1, 2, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual5).toBe(true);

    var actual6 = new CustomSet([4, 1, 3]).subset(new CustomSet([1, 2, 3]));
    expect(actual6).toBe(false);
  });

  xit('can test disjoint', function() {
    var actual = new CustomSet().disjoint(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet().disjoint(new CustomSet([1]));
    expect(actual2).toBe(true);

    var actual3 = new CustomSet([1]).disjoint(new CustomSet());
    expect(actual3).toBe(true);

    var actual4 = new CustomSet([1, 2]).disjoint(new CustomSet([2, 3]));
    expect(actual4).toBe(false);

    var actual5 = new CustomSet([1, 2]).disjoint(new CustomSet([3, 4]));
    expect(actual5).toBe(true);
  });

  xit('can test for equality', function () {
    var actual = new CustomSet().eql(new CustomSet());
    expect(actual).toBe(true);

    var actual2 = new CustomSet().eql(new CustomSet([1, 2, 3]));
    expect(actual2).toBe(false);

    var actual3 = new CustomSet([1, 2, 3]).eql(new CustomSet());
    expect(actual3).toBe(false);

    var actual4 = new CustomSet([1, 2]).eql(new CustomSet([2, 1]));
    expect(actual4).toBe(true);

    var actual5 = new CustomSet([1, 2, 3]).eql(new CustomSet([1, 2, 4]));
    expect(actual5).toBe(false);
  });

  xit('can add a member', function() {
    var actual = new CustomSet().add(3);
    var expected = new CustomSet([3]);
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet([1, 2, 4]).add(3);
    var expected2 = new CustomSet([1, 2, 3, 4]);
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3]).add(3);
    var expected3 = new CustomSet([1, 2, 3]);
    expect(actual3.eql(expected3)).toBe(true);
  });

  xit('can check for intersection', function() {
    var actual = new CustomSet().intersection(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().intersection(new CustomSet([3, 2, 5]));
    var expected2 = new CustomSet();
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3, 4]).intersection(new CustomSet());
    var expected3 = new CustomSet();
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([1, 2, 3]).intersection(new CustomSet([4, 5, 6]));
    var expected4 = new CustomSet();
    expect(actual4.eql(expected4)).toBe(true);

    var actual5 = new CustomSet([1, 2, 3, 4]).intersection(new CustomSet([3, 2, 5]));
    var expected5 = new CustomSet([2, 3]);
    expect(actual5.eql(expected5)).toBe(true);
  });

  xit('can check for difference', function(){
    var actual = new CustomSet().difference(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().difference(new CustomSet([3, 2, 5]));
    var expected2 = new CustomSet();
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 2, 3, 4]).difference(new CustomSet());
    var expected3 = new CustomSet([1, 2, 3, 4]);
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([3, 2, 1]).difference(new CustomSet([2, 4]));
    var expected4 = new CustomSet([1, 3]);
    expect(actual4.eql(expected4)).toBe(true);
  });

  xit('can test for union', function() {
    var actual = new CustomSet().union(new CustomSet());
    var expected = new CustomSet();
    expect(actual.eql(expected)).toBe(true);

    var actual2 = new CustomSet().union(new CustomSet([2]));
    var expected2 = new CustomSet([2]);
    expect(actual2.eql(expected2)).toBe(true);

    var actual3 = new CustomSet([1, 3]).union(new CustomSet());
    var expected3 = new CustomSet([1, 3]);
    expect(actual3.eql(expected3)).toBe(true);

    var actual4 = new CustomSet([1, 3]).union(new CustomSet([2, 3]));
    var expected4 = new CustomSet([3, 2, 1]);
    expect(actual4.eql(expected4)).toBe(true);
  });

  xit('can delete elements', function(){
    var expected = new CustomSet([1, 3]);
{'fraction_non_alphanumeric': 0.18338999514327342, 'fraction_numerical': 0.04060223409422049, 'mean_word_length': 4.0421155729676785, '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': '2635279', 'n_tokens_mistral': 3568, 'n_tokens_neox': 3311, 'n_words': 825}