<commit_before>suite('p5.Vector', function() {
  var RADIANS = 'radians';
  var DEGREES = 'degrees';

  var myp5;

  setup(function(done) {
    new p5(function(p) {
      p.setup = function() {
        myp5 = p;
        done();
      };
    });
  });

  teardown(function() {
    myp5.remove();
  });
  var v;

  suite('p5.prototype.createVector()', function() {
    setup(function() {
      v = myp5.createVector();
    });
    test('should create instance of p5.Vector', function() {
      assert.instanceOf(v, p5.Vector);
    });

    test('should have x, y, z be initialized to 0', function() {
      assert.equal(v.x, 0);
      assert.equal(v.y, 0);
      assert.equal(v.z, 0);
    });
  });

  suite('p5.prototype.createVector()', function() {
    setup(function() {
      v = myp5.createVector(1, 2, 3);
    });

    test('should have x, y, z be initialized to 1,2,3', function() {
      assert.equal(v.x, 1);
      assert.equal(v.y, 2);
      assert.equal(v.z, 3);
    });
  });<commit_msg>Added unit tests<commit_after>suite('p5.Vector', function() {
  var RADIANS = 'radians';
  var DEGREES = 'degrees';

  var myp5;

  setup(function(done) {
    new p5(function(p) {
      p.setup = function() {
        myp5 = p;
        done();
      };
    });
  });

  teardown(function() {
    myp5.remove();
  });
  var v;

  suite('setHeading', function() {
    setup(function() {
      v = createVector(1,1);
      v.setHeading(1);
    });
    test('should have heading() value of 0', function(){
      assert.closeTo(v.heading(), 1, 0.001);
    });
  });
  suite('p5.prototype.createVector()', function() {
    setup(function() {
      v = myp5.createVector();
    });
    test('should create instance of p5.Vector', function() {
      assert.instanceOf(v, p5.Vector);
    });

    test('should have x, y, z be initialized to 0', function() {
      assert.equal(v.x, 0);
      assert.equal(v.y, 0);
      assert.equal(v.z, 0);
    });
  });

  suite('p5.prototype.createVector()', function() {
    setup(function() {
      v = myp5.createVector(1, 2, 3);
    });

    test('should have x, y, z be initialized to 1,2,3', function() {
      assert.equal(v.x, 1);
      assert.equal(v.y, 2);
      assert.equal(v.z, 3);
    });
  });
{'fraction_non_alphanumeric': 0.19256605463502016, 'fraction_numerical': 0.025526197939991044, 'mean_word_length': 2.4422187981510017, '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': '5420851', 'n_tokens_mistral': 849, 'n_tokens_neox': 803, 'n_words': 166}