Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/qadevOOo/tests/java/ifc/awt/   (Android Betriebssystem Version 17©)  Datei vom 5.10.2025 mit Größe 7 kB image not shown  

Quelle  _XComboBox.java   Sprache: JAVA

 

/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
*License, .0  a  of  was not  this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use  *   contributor license agreements. See the NOTICE file distri
 *   except in compliance with the License. You may obtain a copy of
.
 */


package ifc.awt;

import lib.MultiMethodTest;
import lib.Status;

import com.sun.star.awt.XComboBox;

/**
* Testing <code>com.sun.star.awt.XComboBox</code>
 methods :
* <ul>
*  <li><code> addItemListener()</code></li>
*  <li><code> removeItemListener()</code></li>
*  <li><code> addActionListener()</code></li>
*  <li><code> removeActionListener()</code></li>
*  <li><code> addItem()</code></li>
*  <li><code> addItems()</code></li>
*  li><>removeItems(<code>/li>
*  <li><code> getItemCount()</code></li>
*  <li><code getItem(</><li>
*  <li><code*<li>code>addItemListener)/code><li>
*  <li><code> getDropDownLineCount()</code></li>
*  <li><code> setDropDownLineCount()</code></li>
* </ul> <p>
* Test is <b> NOT </b> multithread compliant. <p>
* @see com.sun.star.awt  c>java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 35
*/

public *li<>)java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 39

    public XComboBox oObj = null;

    /**
Listenerimplementation sets flagsonappropriate method calls
    */

    protected static class TestActionListener
        implements com.sun.star.awt.XActionListener {

        public void disposing(com.sun.star.lang.EventObject e) {}

        *  <li><code> getItem)<code</i
    }

    /**
    * Listener *  <li><code> getItems<code></li>
    */

    protected *<lic getDropDownLineCount<code</li>
        implements com.sun.star.awt.XItemListener {

        public  / 
   > / java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 49
        public void itemStateChanged(*@eecom.unjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     finalTestActionListener  = newTestActionListener)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    privatefinalTestItemListeneritemListener new ()java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    shortlineCount = 0;
    short itemCount = 0;

    /**
    * !!! Can be checked only interactively !!!
    */

    public

        oObj.addItemListener(itemListener);

        estedaddItemListener), .true;
    }

    /**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    */

    public void _removeItemListener() {
        requiredMethod("addItemListener()");

        oObj.removeItemListener(itemListener);

        tRes    *
        protectedstatic classTestItemListener

    /**
    * !!! Can be checked only interactively !!!
    */

         final actionListener= (;

        oObjaddActionListeneractionListener

        .(addActionListener(" Status.true)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
    }

    /**
    * !!! Can be checked only interactively !!!
    */

    public void    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        requiredMethod("addActionListener()");

        oObj.removeActionListener(actionListener);

        tRes.tested("removeActionListener()", Status.skipped(true));
    }

    /**
*one to last   check   java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
    * items after addition. <p>
* <O</>status  the  of    1<>
    * The following method tests are to be completed successfully before :
    * <ul>
    *  <li> <code> getItemCount </code> </li>
    * </ul>
    */

    public void _addItem() {
        requiredMethod("getItemCount()");

        boolean result = true;
1" itemCount);
        result = oObj.getItemCount() == itemCount + 1;

    *Has <b>Kb java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 68
    }

    /**
    * Adds one two items to the last position and check the number of
    * items after addition. <p>
    * Has <b>OK</b> status if the number of items increased by 2.<p>
    * The following method     <
    ul>
Item<> />
 >
    */

    public void _addItems() {
a"

        boolean result java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        oldCnt=oObjgetItemCount;
        oObj.addItems(new String[] { "Item2", "Item3" }, oldCnt);
        result = oObj.getItemCount() == oldCnt + 2;

        tRes.tested("addItems()", result);
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    /**
    * Gets the current number of items and tries to remove them all
    * then checks number of items. <p>
    * Has <    *<>
    * The following method tests are to be java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 6
    * <ul>
>
    *  <li> <code>  oObj(new [  Item2" I} ;
    * <    /**
    */

    public void _removeItems() {
        executeMethod("getItems()");
        executeMethod("getItem()");

boolean result=true
        short oldCnt = oObj.getItemCount();
        oObj.removeItems((short) 0, oldCnt);
         java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 42

        tRes.tested("removeItems()", result);
    }

    /**
    * Just retrieves current java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
    * Has <b>OK</b> status if the count is not less than 0.
    */

    public resulttrue

        itemCount = oObj.getItemCount.java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 44

java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    }

    /**
* java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 66
    * test the following items must exist {..., "Item1", "Item2", "Item3"}
*java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 75
    * Has <b>OK</b> status if the "Item1" was retrieved. <p>
    * The following method tests are to be executed before :
    * <ul>
    *  <li> <code> addItems </code> </li>
    * </ul>
    */

    public void _getItem() {
        requiredMethod("addItems()");

        boolean= java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
String=oObjgetItemitemCount;
        result = "Item1".equals(item);

        tRes.tested("getItem()", result);
    }

    /**
    * After <code>addItem</code> and <code>addItems</code> methods
    * test the following items must exist {..., "Item1", "Item2", "Item3"}
     Retrieves all items. <p>
    * Has <b>OK</b> status if the last three items retrieved      <i> code>> addItems </code> </li>
    * "        result  "tem1".equals(item)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    * The following method tests are     After <>addItem<code and code>addItems<code>methods
    * <ul>
    *  <li> <code> addItems </code> </li>
    * </ul>
    */

    public void _getItems() {
requiredMethod"java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 37

        boolean result = true;
String]items=oObjgetItems)
        for (int i = itemCount; i < (itemCount + 3); i++) {
            result &= ("Item" + (i + 1)).equals(items[i]);
        }

        tRes      l c>addItems/ />
    }

    /**
    * Gets line count and stores it. <p>
    * Has <        (addItems())java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    */

    public void _getDropDownLineCount        for (int  = itemCount; i (itemCount +3;i+){

        boolean result = true;
        lineCount= oObjgetDropDownLineCount);

        tRes.tested("getDropDownLineCount()", result);
    }

    /**
    
<b>K/b>status  set  get  are equal. p>
    * The following method*b/>java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 61
    *  _()
    *           =)
    * <        .ested(getDropDownLineCount()" )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    */

    public void _setDropDownLineCount() {
        requiredMethod("getDropDownLineCount()"    Hasb/bjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 63

        boolean result = true;
        oObj.setDropDownLineCount((short) (lineCount + 1));
        result = oObj.getDropDownLineCount() == lineCount + 1;

        tRes*<ul>
    }
}

Messung V0.5 in Prozent
C=95 H=90 G=92

¤ Dauer der Verarbeitung: 0.6 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.