<commit_before>describe "Jax.Mesh.Cube", ->
  cube = null
  verts = colors = texes = norms = null
  
  beforeEach ->
    [verts, colors, texes, norms] = [[], [], [], []]
    cube = new Jax.Mesh.Cube()
  
  it "should rebuild without issue", ->
    for i in [0..10]
      cube.rebuild()
      expect(cube.data.vertexBuffer.length).toBeGreaterThan(0)
      
  it "should build successfully", ->
    cube.init verts, colors, texes, norms
  
  it "should default all colors to white", ->
    for ofs in [0...cube.data.colorBuffer.length] by 4
      expect(cube.data.colorBuffer[ofs]).toEqual 1
      expect(cube.data.colorBuffer[ofs+1]).toEqual 1
      expect(cube.data.colorBuffer[ofs+2]).toEqual 1
      expect(cube.data.colorBuffer[ofs+3]).toEqual 1
  
  it "should allow altering of face color prior to build", ->
    cube.left.color = "#ff0000ff"
    colors = cube.data.colorBuffer;
    expect(colors).toIncludeSubset([1, 0, 0, 1]);
    
  it "should allow altering of face color after build", ->
    cube.rebuild();
    cube.left.color = "#ff0000ff"
    colors = cube.data.colorBuffer;
    expect(colors).toIncludeSubset([1, 0, 0, 1]);
    
  describe "when a side has been changed", ->
    it "should update its vertices", ->
      cube.rebuild();
      cube.left.camera.setPosition([10, 0, 0]);
      expect(cube.data.vertexBuffer).toIncludishSubset([10, 0.5, 0.5]);
      <commit_msg>update cube spec for more correct usage<commit_after>describe "Jax.Mesh.Cube", ->
  cube = null
  verts = colors = texes = norms = null
  
  beforeEach ->
    [verts, colors, texes, norms] = [[], [], [], []]
    cube = new Jax.Mesh.Cube()
  
  it "should rebuild without issue", ->
    for i in [0..10]
      cube.rebuild()
      expect(cube.data.vertexBuffer.length).toBeGreaterThan(0)
      
  it "should build successfully", ->
    cube.init verts, colors, texes, norms
  
  it "should default all colors to white", ->
    for ofs in [0...cube.data.colorBuffer.length] by 4
      expect(cube.data.colorBuffer[ofs]).toEqual 1
      expect(cube.data.colorBuffer[ofs+1]).toEqual 1
      expect(cube.data.colorBuffer[ofs+2]).toEqual 1
      expect(cube.data.colorBuffer[ofs+3]).toEqual 1
  
  it "should allow altering of face color prior to build", ->
    cube.left.color = "#ff0000ff"
    colors = cube.data.colorBuffer;
    expect(colors).toIncludeSubset([1, 0, 0, 1]);
    
  it "should allow altering of face color after build", ->
    cube.validate();
    cube.left.color = "#ff0000ff"
    colors = cube.data.colorBuffer;
    expect(colors).toIncludeSubset([1, 0, 0, 1]);
    
  describe "when a side has been changed", ->
    it "should update its vertices", ->
      cube.rebuild();
      cube.left.camera.setPosition([10, 0, 0]);
      expect(cube.data.vertexBuffer).toIncludishSubset([10, 0.5, 0.5]);
      
{'fraction_non_alphanumeric': 0.1483065953654189, 'fraction_numerical': 0.027807486631016044, 'mean_word_length': 2.913528591352859, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3868055', 'n_tokens_mistral': 1015, 'n_tokens_neox': 951, 'n_words': 232}