Package org.apache.harmony.jpda.tests.framework.jdwp

Examples of org.apache.harmony.jpda.tests.framework.jdwp.Location


                    logWriter.println("");
                    logWriter.println("=> Chcek location for combined event N " + (i+1)
                        + ": Event kind = " + eventKind + "("
                        + JDWPConstants.EventKind.getName(eventKind) +"); eventThreadID = "
                        + eventThreadID);
                    Location eventLocation = null;
                    switch ( eventKind ) {
                    case JDWPConstants.EventKind.METHOD_ENTRY:
                        eventLocation = ((ParsedEvent.Event_METHOD_ENTRY)parsedEvents[i]).getLocation();
                        break;
                    case JDWPConstants.EventKind.SINGLE_STEP:
View Full Code Here


                + "\n## Expected event kind = " + expectedEventKinds[0] + "("
                + JDWPConstants.EventKind.getName(expectedEventKinds[0]) + ")";
            printErrorAndFail(failureMessage);
        }
        boolean testCaseIsOk = true;
        Location location = ((ParsedEvent.Event_METHOD_ENTRY)parsedEvents[0]).getLocation();
        long eventClassID = location.classID;
        logWriter.println("==> ClassID in event = " + eventClassID);
        if ( testedClassID != eventClassID ) {
            logWriter.println("## FAILURE: Unexpected ClassID in event!");
            logWriter.println("##          Expected ClassID (testedClassID) = " + testedClassID );
View Full Code Here

                JDWPConstants.EventKind.EXCEPTION,
                parsedEvents[0].getEventKind(),
                JDWPConstants.EventKind.getName(JDWPConstants.EventKind.EXCEPTION),
                JDWPConstants.EventKind.getName(parsedEvents[0].getEventKind()));
        long returnedThread = ((ParsedEvent.Event_EXCEPTION)parsedEvents[0]).getThreadID();
        Location returnedExceptionLoc =((ParsedEvent.Event_EXCEPTION)parsedEvents[0]).getLocation();
       
        // assert that exception thread is not null
        logWriter.println(">> testExceptionEventLocation: returnedThread = " + returnedThread);
        assertTrue("Returned exception ThreadID is null,", returnedThread != 0);

        // assert that exception location is not null
        logWriter.println(">> testExceptionEventLocation: returnedExceptionLoc = " + returnedExceptionLoc);
        assertTrue("Returned exception location is null,", returnedExceptionLoc != null);

        // assert that top stack frame location is not null
        Location topFrameLoc = getTopFrameLocation(returnedThread);
        logWriter.println(">> testExceptionEventLocation: topFrameLoc = " + topFrameLoc);
        assertTrue("Returned top stack frame location is null,", topFrameLoc != null);

        // assert that locations of exception and top frame are equal
        assertEquals("Different exception and top frame location tag,", returnedExceptionLoc.tag, topFrameLoc.tag);
View Full Code Here

        // assert that only one top frame is returned
        int framesCount = reply.getNextValueAsInt();
        assertEquals("Invalid number of top stack frames,", 1, framesCount);

        long frameID = reply.getNextValueAsFrameID();
        Location loc = reply.getNextValueAsLocation();

        return loc;
    }
View Full Code Here

              
        int frames = reply.getNextValueAsInt();
        FrameInfo[] frameInfos = new FrameInfo[frames];
        for (int i = 0; i < frames; i++) {
            long frameID = reply.getNextValueAsLong();
            Location location = reply.getNextValueAsLocation();
            frameInfos[i] = new FrameInfo(frameID, location);
        }
        return frameInfos;
    }
View Full Code Here

                JDWPConstants.EventKind.EXCEPTION,
                parsedEvents[0].getEventKind(),
                JDWPConstants.EventKind.getName(JDWPConstants.EventKind.EXCEPTION),
                JDWPConstants.EventKind.getName(parsedEvents[0].getEventKind()));
        long returnedThread = ((ParsedEvent.Event_EXCEPTION)parsedEvents[0]).getThreadID();
        Location returnedExceptionLoc =((ParsedEvent.Event_EXCEPTION)parsedEvents[0]).getLocation();
       
        // assert that exception thread is not null
        logWriter.println(">> testExceptionEventLocation: returnedThread = " + returnedThread);
        assertTrue("Returned exception ThreadID is null,", returnedThread != 0);

        // assert that exception location is not null
        logWriter.println(">> testExceptionEventLocation: returnedExceptionLoc = " + returnedExceptionLoc);
        assertTrue("Returned exception location is null,", returnedExceptionLoc != null);

        // assert that top stack frame location is not null
        Location topFrameLoc = getTopFrameLocation(returnedThread);
        logWriter.println(">> testExceptionEventLocation: topFrameLoc = " + topFrameLoc);
        assertTrue("Returned top stack frame location is null,", topFrameLoc != null);

        // assert that locations of exception and top frame are equal
        assertEquals("Different exception and top frame location tag,", returnedExceptionLoc.tag, topFrameLoc.tag);
View Full Code Here

        // set requests for events that will be checked
        logWriter.println("");
        logWriter.println("=> Set request for BREAKPOINT event in debuggee: "
                + getDebuggeeClassName() + ", beginning of method: "
                + methodForEvents);
        Location combinedEventsLocation = getMethodEntryLocation(debuggeeClassID, methodForEvents);
        if ( combinedEventsLocation == null ) {
            String failureMessage = "## FAILURE: Can NOT get MethodEntryLocation for method '"
                + methodForEvents + "'";
            printErrorAndFail(failureMessage);
        }
View Full Code Here

                    logWriter.println("");
                    logWriter.println("=> Chcek location for combined event N " + (i+1)
                        + ": Event kind = " + eventKind + "("
                        + JDWPConstants.EventKind.getName(eventKind) +"); eventThreadID = "
                        + eventThreadID);
                    Location eventLocation = null;
                    switch ( eventKind ) {
                    case JDWPConstants.EventKind.METHOD_ENTRY:
                        eventLocation = ((ParsedEvent.Event_METHOD_ENTRY)parsedEvents[i]).getLocation();
                        break;
                    case JDWPConstants.EventKind.SINGLE_STEP:
View Full Code Here

                + "\n## Expected event kind = " + expectedEventKinds[0] + "("
                + JDWPConstants.EventKind.getName(expectedEventKinds[0]) + ")";
            printErrorAndFail(failureMessage);
        }
        boolean testCaseIsOk = true;
        Location location = ((ParsedEvent.Event_METHOD_ENTRY)parsedEvents[0]).getLocation();
        long eventClassID = location.classID;
        logWriter.println("==> ClassID in event = " + eventClassID);
        if ( testedClassID != eventClassID ) {
            logWriter.println("## FAILURE: Unexpected ClassID in event!");
            logWriter.println("##          Expected ClassID (testedClassID) = " + testedClassID );
View Full Code Here

        // assert that only one top frame is returned
        int framesCount = reply.getNextValueAsInt();
        assertEquals("Invalid number of top stack frames,", 1, framesCount);

        long frameID = reply.getNextValueAsFrameID();
        Location loc = reply.getNextValueAsLocation();

        return loc;
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.jpda.tests.framework.jdwp.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.