[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svnBaseDirTest failure

From: McClain Looney <mlooney_at_gmail.com>
Date: 2004-09-29 17:04:31 CEST

this also failed with the original code. is this failure correct? or
is the test bad?

junit.framework.AssertionFailedError: expected:</home/mml> but was:<home/mml>
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.failNotEquals(Assert.java:282)
        at junit.framework.Assert.assertEquals(Assert.java:64)
        at junit.framework.Assert.assertEquals(Assert.java:71)
        at org.tigris.subversion.svnclientadapter.SVNBaseDirTest.testBaseDir(SVNBaseDirTest.java:18)

Index: /home/mml/svnClientAdapter/src/testcases/org/tigris/subversion/svnclientadapter/SVNBaseDirTest.java
===================================================================
--- /home/mml/svnClientAdapter/src/testcases/org/tigris/subversion/svnclientadapter/SVNBaseDirTest.java (revision
958)
+++ /home/mml/svnClientAdapter/src/testcases/org/tigris/subversion/svnclientadapter/SVNBaseDirTest.java (working
copy)
@@ -11,17 +11,17 @@
 public class SVNBaseDirTest extends TestCase {
 
         public void testBaseDir() throws Exception {
-
- File workingCopy = new File("/home/cedric/programmation/sources/test");
- File currentDir = new File("/home/cedric/projects/subversion/subclipse");
+ String userHome = System.getProperty("user.home");
+ File workingCopy = new File(userHome+"/programmation/sources/test");
+ File currentDir = new File(userHome+"/projects/subversion/subclipse");
                 File baseDir = SVNBaseDir.getCommonPart(workingCopy, currentDir);
- assertEquals(new File("/home/cedric/").getCanonicalFile(), baseDir);
+ assertEquals(new File(userHome).getCanonicalFile(), baseDir);
                 
                 // there was a bug before : it returned
/home/cedric/programmation/projets/subversion ...
- workingCopy = new
File("/home/cedric/programmation/projets/subversion/svnant/test/svn/workingcopy/listenerTest");
- currentDir = new
File("/home/cedric/programmation/projets/subversion/svnant/");
+ workingCopy = new
File(userHome+"/programmation/projets/subversion/svnant/test/svn/workingcopy/listenerTest");
+ currentDir = new File(userHome+"/programmation/projets/subversion/svnant/");
                 baseDir = SVNBaseDir.getCommonPart(workingCopy, currentDir);
- assertEquals(new
File("/home/cedric/programmation/projets/subversion/svnant/").getCanonicalFile(),
baseDir);
+ assertEquals(new
File(userHome+"/programmation/projets/subversion/svnant/").getCanonicalFile(),
baseDir);
         }
 
 }

---
McClain Looney
m@loonsoft.com
Received on Thu Sep 30 01:04:31 2004

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.