Example usage for org.eclipse.jdt.core.tests.util Util displayString

List of usage examples for org.eclipse.jdt.core.tests.util Util displayString

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.tests.util Util displayString.

Prototype

public static String displayString(String inputString, int indent, boolean shift) 

Source Link

Usage

From source file:org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest.java

License:Open Source License

/** Relaxed comparison using contains rather than equals. TODO(SH): pattern matching. */
protected void checkCompilerLog(String[] testFiles, Requestor requestor,
        String[] alternatePlatformIndependantExpectedLogs, Throwable exception) {
    String computedProblemLog = Util.convertToIndependantLineDelimiter(requestor.problemLog.toString());
    for (String platformIndependantExpectedLog : alternatePlatformIndependantExpectedLogs) {
        if (computedProblemLog.contains(platformIndependantExpectedLog))
            return; // OK
    }//from   ww  w.  ja  va 2  s.com
    logTestTitle();
    System.out.println(Util.displayString(computedProblemLog, INDENT, SHIFT));
    logTestFiles(false, testFiles);
    if (errorMatching && exception == null)
        fail("Invalid problem log\n" + computedProblemLog);
    if (!errorMatching && exception == null) {
        assertEquals("Invalid problem log ", alternatePlatformIndependantExpectedLogs[0], computedProblemLog);
    }
}