Ray.tests.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. /* global QUnit */
  2. import { Ray } from '../../../../src/math/Ray';
  3. import { Box3 } from '../../../../src/math/Box3';
  4. import { Vector3 } from '../../../../src/math/Vector3';
  5. import { Sphere } from '../../../../src/math/Sphere';
  6. import { Plane } from '../../../../src/math/Plane';
  7. import { Matrix4 } from '../../../../src/math/Matrix4';
  8. import {
  9. zero3,
  10. one3,
  11. two3,
  12. eps,
  13. posInf3
  14. } from './Constants.tests';
  15. export default QUnit.module( 'Maths', () => {
  16. QUnit.module( 'Ray', () => {
  17. // INSTANCING
  18. QUnit.test( "Instancing", ( assert ) => {
  19. var a = new Ray();
  20. assert.ok( a.origin.equals( zero3 ), "Passed!" );
  21. assert.ok( a.direction.equals( new Vector3( 0, 0, - 1 ) ), "Passed!" );
  22. var a = new Ray( two3.clone(), one3.clone() );
  23. assert.ok( a.origin.equals( two3 ), "Passed!" );
  24. assert.ok( a.direction.equals( one3 ), "Passed!" );
  25. } );
  26. // PUBLIC STUFF
  27. QUnit.todo( "isRay", ( assert ) => {
  28. assert.ok( false, "everything's gonna be alright" );
  29. } );
  30. QUnit.test( "set", ( assert ) => {
  31. var a = new Ray();
  32. a.set( one3, one3 );
  33. assert.ok( a.origin.equals( one3 ), "Passed!" );
  34. assert.ok( a.direction.equals( one3 ), "Passed!" );
  35. } );
  36. QUnit.test( "recast/clone", ( assert ) => {
  37. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  38. assert.ok( a.recast( 0 ).equals( a ), "Passed!" );
  39. var b = a.clone();
  40. assert.ok( b.recast( - 1 ).equals( new Ray( new Vector3( 1, 1, 0 ), new Vector3( 0, 0, 1 ) ) ), "Passed!" );
  41. var c = a.clone();
  42. assert.ok( c.recast( 1 ).equals( new Ray( new Vector3( 1, 1, 2 ), new Vector3( 0, 0, 1 ) ) ), "Passed!" );
  43. var d = a.clone();
  44. var e = d.clone().recast( 1 );
  45. assert.ok( d.equals( a ), "Passed!" );
  46. assert.ok( ! e.equals( d ), "Passed!" );
  47. assert.ok( e.equals( c ), "Passed!" );
  48. } );
  49. QUnit.test( "copy/equals", ( assert ) => {
  50. var a = new Ray( zero3.clone(), one3.clone() );
  51. var b = new Ray().copy( a );
  52. assert.ok( b.origin.equals( zero3 ), "Passed!" );
  53. assert.ok( b.direction.equals( one3 ), "Passed!" );
  54. // ensure that it is a true copy
  55. a.origin = zero3;
  56. a.direction = one3;
  57. assert.ok( b.origin.equals( zero3 ), "Passed!" );
  58. assert.ok( b.direction.equals( one3 ), "Passed!" );
  59. } );
  60. QUnit.test( "at", ( assert ) => {
  61. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  62. var point = new Vector3();
  63. a.at( 0, point );
  64. assert.ok( point.equals( one3 ), "Passed!" );
  65. a.at( - 1, point );
  66. assert.ok( point.equals( new Vector3( 1, 1, 0 ) ), "Passed!" );
  67. a.at( 1, point );
  68. assert.ok( point.equals( new Vector3( 1, 1, 2 ) ), "Passed!" );
  69. } );
  70. QUnit.test( "lookAt", ( assert ) => {
  71. var a = new Ray( two3.clone(), one3.clone() );
  72. var target = one3.clone();
  73. var expected = target.sub( two3 ).normalize();
  74. a.lookAt( target );
  75. assert.ok( a.direction.equals( expected ), "Check if we're looking in the right direction" );
  76. } );
  77. QUnit.test( "closestPointToPoint", ( assert ) => {
  78. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  79. var point = new Vector3();
  80. // behind the ray
  81. a.closestPointToPoint( zero3, point );
  82. assert.ok( point.equals( one3 ), "Passed!" );
  83. // front of the ray
  84. a.closestPointToPoint( new Vector3( 0, 0, 50 ), point );
  85. assert.ok( point.equals( new Vector3( 1, 1, 50 ) ), "Passed!" );
  86. // exactly on the ray
  87. a.closestPointToPoint( one3, point );
  88. assert.ok( point.equals( one3 ), "Passed!" );
  89. } );
  90. QUnit.test( "distanceToPoint", ( assert ) => {
  91. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  92. // behind the ray
  93. var b = a.distanceToPoint( zero3 );
  94. assert.ok( b === Math.sqrt( 3 ), "Passed!" );
  95. // front of the ray
  96. var c = a.distanceToPoint( new Vector3( 0, 0, 50 ) );
  97. assert.ok( c === Math.sqrt( 2 ), "Passed!" );
  98. // exactly on the ray
  99. var d = a.distanceToPoint( one3 );
  100. assert.ok( d === 0, "Passed!" );
  101. } );
  102. QUnit.test( "distanceSqToPoint", ( assert ) => {
  103. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  104. // behind the ray
  105. var b = a.distanceSqToPoint( zero3 );
  106. assert.ok( b === 3, "Passed!" );
  107. // front of the ray
  108. var c = a.distanceSqToPoint( new Vector3( 0, 0, 50 ) );
  109. assert.ok( c === 2, "Passed!" );
  110. // exactly on the ray
  111. var d = a.distanceSqToPoint( one3 );
  112. assert.ok( d === 0, "Passed!" );
  113. } );
  114. QUnit.test( "distanceSqToSegment", ( assert ) => {
  115. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  116. var ptOnLine = new Vector3();
  117. var ptOnSegment = new Vector3();
  118. //segment in front of the ray
  119. var v0 = new Vector3( 3, 5, 50 );
  120. var v1 = new Vector3( 50, 50, 50 ); // just a far away point
  121. var distSqr = a.distanceSqToSegment( v0, v1, ptOnLine, ptOnSegment );
  122. assert.ok( ptOnSegment.distanceTo( v0 ) < 0.0001, "Passed!" );
  123. assert.ok( ptOnLine.distanceTo( new Vector3( 1, 1, 50 ) ) < 0.0001, "Passed!" );
  124. // ((3-1) * (3-1) + (5-1) * (5-1) = 4 + 16 = 20
  125. assert.ok( Math.abs( distSqr - 20 ) < 0.0001, "Passed!" );
  126. //segment behind the ray
  127. var v0 = new Vector3( - 50, - 50, - 50 ); // just a far away point
  128. var v1 = new Vector3( - 3, - 5, - 4 );
  129. var distSqr = a.distanceSqToSegment( v0, v1, ptOnLine, ptOnSegment );
  130. assert.ok( ptOnSegment.distanceTo( v1 ) < 0.0001, "Passed!" );
  131. assert.ok( ptOnLine.distanceTo( one3 ) < 0.0001, "Passed!" );
  132. // ((-3-1) * (-3-1) + (-5-1) * (-5-1) + (-4-1) + (-4-1) = 16 + 36 + 25 = 77
  133. assert.ok( Math.abs( distSqr - 77 ) < 0.0001, "Passed!" );
  134. //exact intersection between the ray and the segment
  135. var v0 = new Vector3( - 50, - 50, - 50 );
  136. var v1 = new Vector3( 50, 50, 50 );
  137. var distSqr = a.distanceSqToSegment( v0, v1, ptOnLine, ptOnSegment );
  138. assert.ok( ptOnSegment.distanceTo( one3 ) < 0.0001, "Passed!" );
  139. assert.ok( ptOnLine.distanceTo( one3 ) < 0.0001, "Passed!" );
  140. assert.ok( distSqr < 0.0001, "Passed!" );
  141. } );
  142. QUnit.test( "intersectSphere", ( assert ) => {
  143. var TOL = 0.0001;
  144. var point = new Vector3();
  145. // ray a0 origin located at ( 0, 0, 0 ) and points outward in negative-z direction
  146. var a0 = new Ray( zero3.clone(), new Vector3( 0, 0, - 1 ) );
  147. // ray a1 origin located at ( 1, 1, 1 ) and points left in negative-x direction
  148. var a1 = new Ray( one3.clone(), new Vector3( - 1, 0, 0 ) );
  149. // sphere (radius of 2) located behind ray a0, should result in null
  150. var b = new Sphere( new Vector3( 0, 0, 3 ), 2 );
  151. a0.intersectSphere( b, point.copy( posInf3 ) );
  152. assert.ok( point.equals( posInf3 ), "Passed!" );
  153. // sphere (radius of 2) located in front of, but too far right of ray a0, should result in null
  154. var b = new Sphere( new Vector3( 3, 0, - 1 ), 2 );
  155. a0.intersectSphere( b, point.copy( posInf3 ) );
  156. assert.ok( point.equals( posInf3 ), "Passed!" );
  157. // sphere (radius of 2) located below ray a1, should result in null
  158. var b = new Sphere( new Vector3( 1, - 2, 1 ), 2 );
  159. a1.intersectSphere( b, point.copy( posInf3 ) );
  160. assert.ok( point.equals( posInf3 ), "Passed!" );
  161. // sphere (radius of 1) located to the left of ray a1, should result in intersection at 0, 1, 1
  162. var b = new Sphere( new Vector3( - 1, 1, 1 ), 1 );
  163. a1.intersectSphere( b, point );
  164. assert.ok( point.distanceTo( new Vector3( 0, 1, 1 ) ) < TOL, "Passed!" );
  165. // sphere (radius of 1) located in front of ray a0, should result in intersection at 0, 0, -1
  166. var b = new Sphere( new Vector3( 0, 0, - 2 ), 1 );
  167. a0.intersectSphere( b, point );
  168. assert.ok( point.distanceTo( new Vector3( 0, 0, - 1 ) ) < TOL, "Passed!" );
  169. // sphere (radius of 2) located in front & right of ray a0, should result in intersection at 0, 0, -1, or left-most edge of sphere
  170. var b = new Sphere( new Vector3( 2, 0, - 1 ), 2 );
  171. a0.intersectSphere( b, point );
  172. assert.ok( point.distanceTo( new Vector3( 0, 0, - 1 ) ) < TOL, "Passed!" );
  173. // same situation as above, but move the sphere a fraction more to the right, and ray a0 should now just miss
  174. var b = new Sphere( new Vector3( 2.01, 0, - 1 ), 2 );
  175. a0.intersectSphere( b, point.copy( posInf3 ) );
  176. assert.ok( point.equals( posInf3 ), "Passed!" );
  177. // following QUnit.tests are for situations where the ray origin is inside the sphere
  178. // sphere (radius of 1) center located at ray a0 origin / sphere surrounds the ray origin, so the first intersect point 0, 0, 1,
  179. // is behind ray a0. Therefore, second exit point on back of sphere will be returned: 0, 0, -1
  180. // thus keeping the intersection point always in front of the ray.
  181. var b = new Sphere( zero3.clone(), 1 );
  182. a0.intersectSphere( b, point );
  183. assert.ok( point.distanceTo( new Vector3( 0, 0, - 1 ) ) < TOL, "Passed!" );
  184. // sphere (radius of 4) center located behind ray a0 origin / sphere surrounds the ray origin, so the first intersect point 0, 0, 5,
  185. // is behind ray a0. Therefore, second exit point on back of sphere will be returned: 0, 0, -3
  186. // thus keeping the intersection point always in front of the ray.
  187. var b = new Sphere( new Vector3( 0, 0, 1 ), 4 );
  188. a0.intersectSphere( b, point );
  189. assert.ok( point.distanceTo( new Vector3( 0, 0, - 3 ) ) < TOL, "Passed!" );
  190. // sphere (radius of 4) center located in front of ray a0 origin / sphere surrounds the ray origin, so the first intersect point 0, 0, 3,
  191. // is behind ray a0. Therefore, second exit point on back of sphere will be returned: 0, 0, -5
  192. // thus keeping the intersection point always in front of the ray.
  193. var b = new Sphere( new Vector3( 0, 0, - 1 ), 4 );
  194. a0.intersectSphere( b, point );
  195. assert.ok( point.distanceTo( new Vector3( 0, 0, - 5 ) ) < TOL, "Passed!" );
  196. } );
  197. QUnit.test( "intersectsSphere", ( assert ) => {
  198. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  199. var b = new Sphere( zero3, 0.5 );
  200. var c = new Sphere( zero3, 1.5 );
  201. var d = new Sphere( one3, 0.1 );
  202. var e = new Sphere( two3, 0.1 );
  203. var f = new Sphere( two3, 1 );
  204. assert.ok( ! a.intersectsSphere( b ), "Passed!" );
  205. assert.ok( ! a.intersectsSphere( c ), "Passed!" );
  206. assert.ok( a.intersectsSphere( d ), "Passed!" );
  207. assert.ok( ! a.intersectsSphere( e ), "Passed!" );
  208. assert.ok( ! a.intersectsSphere( f ), "Passed!" );
  209. } );
  210. QUnit.todo( "distanceToPlane", ( assert ) => {
  211. assert.ok( false, "everything's gonna be alright" );
  212. } );
  213. QUnit.test( "intersectPlane", ( assert ) => {
  214. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  215. var point = new Vector3();
  216. // parallel plane behind
  217. var b = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), new Vector3( 1, 1, - 1 ) );
  218. a.intersectPlane( b, point.copy( posInf3 ) );
  219. assert.ok( point.equals( posInf3 ), "Passed!" );
  220. // parallel plane coincident with origin
  221. var c = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), new Vector3( 1, 1, 0 ) );
  222. a.intersectPlane( c, point.copy( posInf3 ) );
  223. assert.ok( point.equals( posInf3 ), "Passed!" );
  224. // parallel plane infront
  225. var d = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), new Vector3( 1, 1, 1 ) );
  226. a.intersectPlane( d, point.copy( posInf3 ) );
  227. assert.ok( point.equals( a.origin ), "Passed!" );
  228. // perpendical ray that overlaps exactly
  229. var e = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 1, 0, 0 ), one3 );
  230. a.intersectPlane( e, point.copy( posInf3 ) );
  231. assert.ok( point.equals( a.origin ), "Passed!" );
  232. // perpendical ray that doesn't overlap
  233. var f = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 1, 0, 0 ), zero3 );
  234. a.intersectPlane( f, point.copy( posInf3 ) );
  235. assert.ok( point.equals( posInf3 ), "Passed!" );
  236. } );
  237. QUnit.test( "intersectsPlane", ( assert ) => {
  238. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  239. // parallel plane in front of the ray
  240. var b = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), one3.clone().sub( new Vector3( 0, 0, - 1 ) ) );
  241. assert.ok( a.intersectsPlane( b ), "Passed!" );
  242. // parallel plane coincident with origin
  243. var c = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), one3.clone().sub( new Vector3( 0, 0, 0 ) ) );
  244. assert.ok( a.intersectsPlane( c ), "Passed!" );
  245. // parallel plane behind the ray
  246. var d = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 0, 0, 1 ), one3.clone().sub( new Vector3( 0, 0, 1 ) ) );
  247. assert.ok( ! a.intersectsPlane( d ), "Passed!" );
  248. // perpendical ray that overlaps exactly
  249. var e = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 1, 0, 0 ), one3 );
  250. assert.ok( a.intersectsPlane( e ), "Passed!" );
  251. // perpendical ray that doesn't overlap
  252. var f = new Plane().setFromNormalAndCoplanarPoint( new Vector3( 1, 0, 0 ), zero3 );
  253. assert.ok( ! a.intersectsPlane( f ), "Passed!" );
  254. } );
  255. QUnit.test( "intersectBox", ( assert ) => {
  256. var TOL = 0.0001;
  257. var box = new Box3( new Vector3( - 1, - 1, - 1 ), new Vector3( 1, 1, 1 ) );
  258. var point = new Vector3();
  259. var a = new Ray( new Vector3( - 2, 0, 0 ), new Vector3( 1, 0, 0 ) );
  260. //ray should intersect box at -1,0,0
  261. assert.ok( a.intersectsBox( box ) === true, "Passed!" );
  262. a.intersectBox( box, point );
  263. assert.ok( point.distanceTo( new Vector3( - 1, 0, 0 ) ) < TOL, "Passed!" );
  264. var b = new Ray( new Vector3( - 2, 0, 0 ), new Vector3( - 1, 0, 0 ) );
  265. //ray is point away from box, it should not intersect
  266. assert.ok( b.intersectsBox( box ) === false, "Passed!" );
  267. b.intersectBox( box, point.copy( posInf3 ) );
  268. assert.ok( point.equals( posInf3 ), "Passed!" );
  269. var c = new Ray( new Vector3( 0, 0, 0 ), new Vector3( 1, 0, 0 ) );
  270. // ray is inside box, should return exit point
  271. assert.ok( c.intersectsBox( box ) === true, "Passed!" );
  272. c.intersectBox( box, point );
  273. assert.ok( point.distanceTo( new Vector3( 1, 0, 0 ) ) < TOL, "Passed!" );
  274. var d = new Ray( new Vector3( 0, 2, 1 ), new Vector3( 0, - 1, - 1 ).normalize() );
  275. //tilted ray should intersect box at 0,1,0
  276. assert.ok( d.intersectsBox( box ) === true, "Passed!" );
  277. d.intersectBox( box, point );
  278. assert.ok( point.distanceTo( new Vector3( 0, 1, 0 ) ) < TOL, "Passed!" );
  279. var e = new Ray( new Vector3( 1, - 2, 1 ), new Vector3( 0, 1, 0 ).normalize() );
  280. //handle case where ray is coplanar with one of the boxes side - box in front of ray
  281. assert.ok( e.intersectsBox( box ) === true, "Passed!" );
  282. e.intersectBox( box, point );
  283. assert.ok( point.distanceTo( new Vector3( 1, - 1, 1 ) ) < TOL, "Passed!" );
  284. var f = new Ray( new Vector3( 1, - 2, 0 ), new Vector3( 0, - 1, 0 ).normalize() );
  285. //handle case where ray is coplanar with one of the boxes side - box behind ray
  286. assert.ok( f.intersectsBox( box ) === false, "Passed!" );
  287. f.intersectBox( box, point.copy( posInf3 ) );
  288. assert.ok( point.equals( posInf3 ), "Passed!" );
  289. } );
  290. QUnit.todo( "intersectsBox", ( assert ) => {
  291. assert.ok( false, "everything's gonna be alright" );
  292. } );
  293. QUnit.test( "intersectTriangle", ( assert ) => {
  294. var ray = new Ray();
  295. var a = new Vector3( 1, 1, 0 );
  296. var b = new Vector3( 0, 1, 1 );
  297. var c = new Vector3( 1, 0, 1 );
  298. var point = new Vector3();
  299. // DdN == 0
  300. ray.set( ray.origin, zero3.clone() );
  301. ray.intersectTriangle( a, b, c, false, point.copy( posInf3 ) );
  302. assert.ok( point.equals( posInf3 ), "No intersection if direction == zero" );
  303. // DdN > 0, backfaceCulling = true
  304. ray.set( ray.origin, one3.clone() );
  305. ray.intersectTriangle( a, b, c, true, point.copy( posInf3 ) );
  306. assert.ok( point.equals( posInf3 ), "No intersection with backside faces if backfaceCulling is true" );
  307. // DdN > 0
  308. ray.set( ray.origin, one3.clone() );
  309. ray.intersectTriangle( a, b, c, false, point );
  310. assert.ok( Math.abs( point.x - 2 / 3 ) <= eps, "Successful intersection: check x" );
  311. assert.ok( Math.abs( point.y - 2 / 3 ) <= eps, "Successful intersection: check y" );
  312. assert.ok( Math.abs( point.z - 2 / 3 ) <= eps, "Successful intersection: check z" );
  313. // DdN > 0, DdQxE2 < 0
  314. b.multiplyScalar( - 1 );
  315. ray.intersectTriangle( a, b, c, false, point.copy( posInf3 ) );
  316. assert.ok( point.equals( posInf3 ), "No intersection" );
  317. // DdN > 0, DdE1xQ < 0
  318. a.multiplyScalar( - 1 );
  319. ray.intersectTriangle( a, b, c, false, point.copy( posInf3 ) );
  320. assert.ok( point.equals( posInf3 ), "No intersection" );
  321. // DdN > 0, DdQxE2 + DdE1xQ > DdN
  322. b.multiplyScalar( - 1 );
  323. ray.intersectTriangle( a, b, c, false, point.copy( posInf3 ) );
  324. assert.ok( point.equals( posInf3 ), "No intersection" );
  325. // DdN < 0, QdN < 0
  326. a.multiplyScalar( - 1 );
  327. b.multiplyScalar( - 1 );
  328. ray.direction.multiplyScalar( - 1 );
  329. ray.intersectTriangle( a, b, c, false, point.copy( posInf3 ) );
  330. assert.ok( point.equals( posInf3 ), "No intersection when looking in the wrong direction" );
  331. } );
  332. QUnit.test( "applyMatrix4", ( assert ) => {
  333. var a = new Ray( one3.clone(), new Vector3( 0, 0, 1 ) );
  334. var m = new Matrix4();
  335. assert.ok( a.clone().applyMatrix4( m ).equals( a ), "Passed!" );
  336. var a = new Ray( zero3.clone(), new Vector3( 0, 0, 1 ) );
  337. m.makeRotationZ( Math.PI );
  338. assert.ok( a.clone().applyMatrix4( m ).equals( a ), "Passed!" );
  339. m.makeRotationX( Math.PI );
  340. var b = a.clone();
  341. b.direction.negate();
  342. var a2 = a.clone().applyMatrix4( m );
  343. assert.ok( a2.origin.distanceTo( b.origin ) < 0.0001, "Passed!" );
  344. assert.ok( a2.direction.distanceTo( b.direction ) < 0.0001, "Passed!" );
  345. a.origin = new Vector3( 0, 0, 1 );
  346. b.origin = new Vector3( 0, 0, - 1 );
  347. var a2 = a.clone().applyMatrix4( m );
  348. assert.ok( a2.origin.distanceTo( b.origin ) < 0.0001, "Passed!" );
  349. assert.ok( a2.direction.distanceTo( b.direction ) < 0.0001, "Passed!" );
  350. } );
  351. QUnit.todo( "equals", ( assert ) => {
  352. assert.ok( false, "everything's gonna be alright" );
  353. } );
  354. } );
  355. } );