4 Copyright (c) 2012 The Chromium Authors. All rights reserved.
5 Use of this source code is governed by a BSD-style license that can be
6 found in the LICENSE file.
9 <script src=
"../base.js"></script>
11 base
.require('base.unittest');
12 base
.require('base.bbox2');
19 var BBox2
= base
.BBox2
;
21 function testAddVec2() {
22 var bbox
= new BBox2();
23 var x
= vec2
.create();
26 assertTrue(bbox
.minPoint
.x
== 10);
27 assertTrue(bbox
.minPoint
.y
== 10);
28 assertTrue(bbox
.maxPoint
.x
== 10);
29 assertTrue(bbox
.maxPoint
.y
== 10);
33 // Bbox shouldn't have changed.
34 assertTrue(bbox
.minPoint
.x
== 10);
35 assertTrue(bbox
.minPoint
.y
== 10);
36 assertTrue(bbox
.maxPoint
.x
== 10);
37 assertTrue(bbox
.maxPoint
.y
== 10);