Permalink
Browse files

Added to unittest of Quaternion a check that internal value not are a…

…ccesible via a external array
  • Loading branch information...
1 parent 9e8c723 commit 3d13d4442b6621f4469272e83f96980bbd8fd31a @Zardoz89 committed Jul 4, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 quaternion.d
View
@@ -99,7 +99,9 @@ if (__traits(isFloating, T)) {
unittest {
auto q = Qua_r(1,2,3,4);
assert(q.coor == [1,2,3,4]);
- q = Qua_r([4.0,3.0,2.0,1.0]);
+ real[] arr = [4.0,3.0,2.0,1.0];
+ q = Qua_r(arr);
+ arr[0] = 7.7;
assert(q.coor == [4,3,2,1]);
q = Qua_r(Vec4r(1,2,3,4));
assert(q.coor == [1,2,3,4]);

0 comments on commit 3d13d44

Please sign in to comment.