Permalink
Browse files

Predeclare Git2.Cache in our tests to prevent warnings and add a test…

… file for Cache tests
  • Loading branch information...
1 parent 1a02347 commit e67b39fe61f01fb974dc204bee594796cc62e0b9 @leto leto committed Jul 15, 2012
Showing with 33 additions and 0 deletions.
  1. +1 −0 t/winxed/001_load.t
  2. +32 −0 t/winxed/002_cache.t
View
1 t/winxed/001_load.t
@@ -19,6 +19,7 @@ namespace Git2 {
class Repository;
class Index;
class Branch;
+ class Cache;
}
class Test_git2_repository_open {
View
32 t/winxed/002_cache.t
@@ -0,0 +1,32 @@
+#/usr/bin/env winxed
+
+$load "rosella/test.pbc";
+$load "./src/git2.pbc";
+$load "./src/Git2/Common.pbc";
+$load "./src/Git2/Repository.pbc";
+$load "dumper.pbc";
+
+$include_const 'datatypes.pasm';
+$include_const "iglobals.pasm";
+
+namespace Git2 {
+ class Repository;
+ class Index;
+ class Branch;
+ class Cache;
+}
+
+class Test_git2_cache {
+ function test_new_cache() {
+ var cache = new Git2.Cache();
+ self.assert.instance_of(cache, class Git2.Cache);
+
+ // make sure we can create two in the same scope
+ var cache2 = new Git2.Cache();
+ self.assert.instance_of(cache2, class Git2.Cache);
+ }
+}
+function main[main]() {
+ using Rosella.Test.test;
+ test(class Test_git2_cache);
+}

0 comments on commit e67b39f

Please sign in to comment.