test/test_line.rb in gmath3D-0.1.1 vs test/test_line.rb in gmath3D-0.2.0
- old
+ new
@@ -1,5 +1,8 @@
+$LOAD_PATH.unshift(File.dirname(__FILE__))
+require 'helper'
+
include GMath3D
MiniTest::Unit.autorun
class LineTestCase < MiniTest::Unit::TestCase
@@ -12,9 +15,14 @@
assert(direction_tmp == line.direction )
lineDefault = Line.new()
assert(Vector3.new(0,0,0) == lineDefault.base_point)
assert(Vector3.new(1,0,0) == lineDefault.direction )
+ end
+
+ def test_to_s
+ line = Line.new(Vector3.new(2.0, 3, 5), Vector3.new(1.0, 1.0, 1.0))
+ assert_equal("Line[point[2.0, 3, 5], vector[1.0, 1.0, 1.0]", line.to_s);
end
def test_point
base_point_tmp = Vector3.new(2.0, 3.0, 5.0)
direction_tmp = Vector3.new(1.0, 1.0, 0.0)