<commit_before>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Vector do
  it "should returns Vector when initialize with no arguments" do
    vector = Vector.new()
    vector.should be_instance_of Vector
  end

  it "should returns (3,-1,5,1) Vector when initialize with Vector.new(3,-1,5)" do
    vector = Vector.new(3, -1, 5)
    vector.x.should == 3
    vector.y.should == -1
    vector.z.should == 5
    vector.w.should == 1
  end

  it "returns 44 when dot product (3,-1,5) with (-2,0,10)" do
    v1 = Vector.new(3,-1,5)
    v2 = Vector.new(-2,0,10)
    result = v1 * v2
    result.should == 44
  end

  it "returns when cross product (3,-1,5) with (-2,3,10)" do
    v1 = Vector.new(3,-1,5)
    v2 = Vector.new(-2,3,10)
    result = v1.cross(v2)
    result.x.should == -25
    result.y.should == -40
    result.z.should == 7
    result.w.should == 1
  end

  it "returns (1,2,15) when add (3,-1,5) with (-2,3,10)" do
    v1 = Vector.new(3,-1,5)
    v2 = Vector.new(-2,3,10)
    result = v1 + v2
    result.x.should == 1
    result.y.should == 2
    result.z.should == 15
    result.w.should == 1
  end
<commit_msg>@v1, @v2 for test bed<commit_after>require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Vector do
  before do
    @v1 = Vector.new(3,-1,5)
    @v2 = Vector.new(-2,3,10)
  end

  it "should returns Vector when initialize with no arguments" do
    vector = Vector.new()
    vector.should be_instance_of Vector
  end

  it "should returns (3,-1,5,1) Vector when initialize with Vector.new(3,-1,5)" do
    @v1.x.should == 3
    @v1.y.should == -1
    @v1.z.should == 5
    @v1.w.should == 1
  end

  it "returns 44 when dot product (3,-1,5) with (-2,0,10)" do
    v2 = Vector.new(-2,0,10)
    result = @v1 * v2
    result.should == 44
  end

  it "returns when cross product (3,-1,5) with (-2,3,10)" do
    result = @v1.cross(@v2)
    result.x.should == -25
    result.y.should == -40
    result.z.should == 7
    result.w.should == 1
  end

  it "returns (1,2,15) when add (3,-1,5) with (-2,3,10)" do
    result = @v1 + @v2
    result.x.should == 1
    result.y.should == 2
    result.z.should == 15
    result.w.should == 1
  end

{'fraction_non_alphanumeric': 0.16189176898590268, 'fraction_numerical': 0.0745793542519327, 'mean_word_length': 2.5426731078904994, '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': '7349184', 'n_tokens_mistral': 913, 'n_tokens_neox': 856, 'n_words': 225}