Browse Source

Make test more robust. In particular - make it pass on Mac OS X.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274230 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
2c59f23fdc
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReportTest.java

+ 5
- 2
src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/XMLReportTest.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* Copyright (c) 2001,2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,6 +64,7 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import junit.framework.TestCase;
import org.apache.tools.ant.types.Path;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -95,7 +96,9 @@ public class XMLReportTest extends TestCase {
incl.setMethod("set*");
filters.addInclude(incl);
report.setReportFilters(filters);
Document doc = report.createDocument(new String[]{ System.getProperty("java.home") + "/lib/rt.jar"});
Path p = new Path(null);
p.addJavaRuntime();
Document doc = report.createDocument(p.list());

Node snapshot = doc.getDocumentElement();
assertEquals("snapshot", snapshot.getNodeName());


Loading…
Cancel
Save