You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2007/04/16 16:27:13 UTC

svn commit: r529263 - /harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java

Author: gshimansky
Date: Mon Apr 16 07:27:12 2007
New Revision: 529263

URL: http://svn.apache.org/viewvc?view=rev&rev=529263
Log:
Applied HARMONY-3660 [jdktools][jpda] fix JDWP test org.apache.harmony.jpda.tests.jdwp.ThreadReference.FramesTest


Modified:
    harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java?view=diff&rev=529263&r1=529262&r2=529263
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java (original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/test/common/unit/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java Mon Apr 16 07:27:12 2007
@@ -252,13 +252,13 @@
                     + "(" + JDWPConstants.Error.getName(err) + ")");
         }
         String methodName, classSignature;
-        int frameNumber = 0;
+        int frameNumber = -1;
         int i = 0;
         for (Enumeration e = allFrames.elements(); e.hasMoreElements(); i++) {
             FrameStruct frame = (FrameStruct )e.nextElement();
             methodName = getMethodName(frame.loc.classID, frame.loc.methodID);
             classSignature = getClassSignature(frame.loc.classID);
-            if (frameNumber == 0 && FramesDebuggee.METHOD_NAME.equals(methodName)) {
+            if (frameNumber < 0 && FramesDebuggee.METHOD_NAME.equals(methodName)) {
                 frameNumber = i;
             }
                logWriter.println("\t" + i + ". frameID=" + frame.frameID
@@ -267,7 +267,7 @@
                     + "(" + frame.loc.index + ")");
         }
 
-        if (frameNumber <= 0) {
+        if (frameNumber < 0) {
             printErrorAndFail("frameNumber is unexpectedly equal to " + frameNumber);
         }
         
@@ -347,13 +347,13 @@
                     + "(" + JDWPConstants.Error.getName(err) + ")");
         }
         String methodName, classSignature;
-        int frameNumber = 0;
+        int frameNumber = -1;
         int i = 0;
         for (Enumeration e = allFrames.elements(); e.hasMoreElements(); i++) {
             FrameStruct frame = (FrameStruct )e.nextElement();
             methodName = getMethodName(frame.loc.classID, frame.loc.methodID);
             classSignature = getClassSignature(frame.loc.classID);
-            if (frameNumber == 0 && FramesDebuggee.METHOD_NAME.equals(methodName)) {
+            if (frameNumber < 0 && FramesDebuggee.METHOD_NAME.equals(methodName)) {
                 frameNumber = i;
             }
             logWriter.println("\t" + i + ". frameID=" + frame.frameID
@@ -362,7 +362,7 @@
                     + "(" + frame.loc.index + ")");
         }
 
-        if (frameNumber <= 0) {
+        if (frameNumber < 0) {
             logWriter.printError("frameNumber is unexpectedly equal to " + frameNumber);
             assertTrue("Invalid frameNumber", frameNumber > 0);
         }