aboutsummaryrefslogtreecommitdiff
path: root/contexts/data/lib/closure-library/closure/goog/structs/collection_test.html
diff options
context:
space:
mode:
Diffstat (limited to 'contexts/data/lib/closure-library/closure/goog/structs/collection_test.html')
-rw-r--r--contexts/data/lib/closure-library/closure/goog/structs/collection_test.html57
1 files changed, 0 insertions, 57 deletions
diff --git a/contexts/data/lib/closure-library/closure/goog/structs/collection_test.html b/contexts/data/lib/closure-library/closure/goog/structs/collection_test.html
deleted file mode 100644
index 1ce9932..0000000
--- a/contexts/data/lib/closure-library/closure/goog/structs/collection_test.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<!doctype html>
-<html>
-<!--
-Copyright 2011 The Closure Library Authors. All Rights Reserved.
-
-Use of this source code is governed by the Apache License, Version 2.0.
-See the COPYING file for details.
--->
- <head>
- <title>Closure Unit Tests - goog.structs.Collection</title>
- <script src="../base.js"></script>
- <script>
- goog.require('goog.structs.AvlTree');
- goog.require('goog.structs.Collection');
- goog.require('goog.structs.Set');
- goog.require('goog.testing.jsunit');
- </script>
- </head>
- <body>
- <script>
-
-function testSet() {
- var set = new goog.structs.Set();
- exerciseCollection(set)
-}
-
-function testAvlTree() {
- var tree = new goog.structs.AvlTree();
- exerciseCollection(tree)
-}
-
-// Simple exercise of a collection object.
-function exerciseCollection(collection) {
- assertEquals(0, collection.getCount());
-
- for (var i = 1; i <= 10; i++) {
- assertFalse(collection.contains(i));
- collection.add(i);
- assertTrue(collection.contains(i));
- assertEquals(i, collection.getCount());
- }
-
- assertEquals(10, collection.getCount());
-
- for (var i = 10; i > 0; i--) {
- assertTrue(collection.contains(i));
- collection.remove(i);
- assertFalse(collection.contains(i));
- assertEquals(i - 1, collection.getCount());
- }
-
- assertEquals(0, collection.getCount());
-}
-
- </script>
- </body>
-</html>