亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testscreen.java

?? MoMEUnit是一個單元測試的J2ME的應用程序xUnit架構實例。這是來自JUnit框架
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
  /**   * Sets whether test failure and error events should be printed to standard   * error output.   *    * @param printToStdErr   *          <code>true</code> if test failure and error events should be   *          printed to standard error output.   * @since 1.0   */  public void setPrintToStdErr(boolean printToStdErr)  {    this.printToStdErr = printToStdErr;  }  /**   * Returns the TestResult contained in TestScreen.   *    * @return TestResult instance contained in TestScreen.   * @since 1.0   */  public TestResult getTestResult()  {    return this.result;  }  /**   * Checks if test failure and error stack-trace should be printed to standard   * error output.   *    * @return <code>true</code> if test failure and error stack-trace should be   *         printed to standard error output, <code>false</code> otherwise.   * @since 1.0   */  public boolean isPrintStackTrace()  {    return this.printStackTrace;  }  /**   * Sets whether test failure and error stack-trace should be printed to   * standard error output.   *    * @param printStackTrace   *          <code>true</code> if test failure and error stack-trace should   *          be printed to standard error output.   * @since 1.0   */  public void setPrintStackTrace(boolean printStackTrace)  {    this.printStackTrace = printStackTrace;  }  /**   * Prepares TestScreen to a new tests execution.   *    * @param testCasesNumber   *          number of test cases.   * @since 1.0   */  public void clearResult(int testCasesNumber)  {    if (testCasesNumber < 0) throw new IllegalArgumentException(        "testCasesNumber < 0 : " + testCasesNumber);    this.lastTest = null;    this.result = new TestResult();    this.result.setListener(this);    this.testCasesNumber = testCasesNumber;    this.hasFailures = false;    this.failTests.deleteAll();    this.hasErrors = false;    this.errorTests.deleteAll();    this.show();    this.repaint();  }  /**   * Shows a progress bar at specified position and size.   *    * @param x   * @param y   * @param width   * @param height   * @since 1.0   */  private void showProgressBar(int x, int y, int width, int height)  {    if (this.testCasesNumber > 0)    {      int color;      if (this.hasErrors) color = this.errorColor;      else if (this.hasFailures) color = this.failureColor;      else color = this.okColor;      this.g.setColor(color);      this.g.fillRect(x, y, width * this.result.runCount()          / this.testCasesNumber, PROGRESSBAR_HEIGHT);    }  }  /**   * Shows statistics of tests run at specified position.   *    * @param y   * @since 1.0   */  private void showStatistics(int y)  {    this.g.setFont(statisticsFont);    this.g.setColor(this.fgColor);    String testStr = TESTS_COUNT_PREFIX + this.result.runCount();    int testStrLength = statisticsFont.stringWidth(testStr);    String fStr = FAILURES_COUNT_PREFIX + this.result.failureCount();    int fStrLength = statisticsFont.stringWidth(fStr);    String eStr = ERRORS_COUNT_PREFIX + this.result.errorCount();    int eStrLength = statisticsFont.stringWidth(eStr);    int indent = (this.width - testStrLength - fStrLength - eStrLength) / 6;    if (indent < 0)    {      testStr = Integer.toString(this.result.runCount());      testStrLength = statisticsFont.stringWidth(testStr);      fStr = Integer.toString(this.result.failureCount());      fStrLength = statisticsFont.stringWidth(fStr);      eStr = Integer.toString(this.result.errorCount());      eStrLength = statisticsFont.stringWidth(eStr);      indent = (this.width - testStrLength - fStrLength - eStrLength) / 6;    }    int x = 0;    g.drawString(testStr, x += indent, y, TOP_LEFT);    this.g.setColor(this.failureColor);    x += (indent + testStrLength);    if (this.failureListType && this.hasFailures)    {      this.g.fillRect(x, y, fStrLength + 2 * indent, statisticsFontHeight);      this.g.setColor(this.bgColor);    }    g.drawString(fStr, x += indent, y, TOP_LEFT);    this.g.setColor(this.errorColor);    x += (indent + fStrLength);    if (!this.failureListType && this.hasErrors)    {      this.g.fillRect(x, y, eStrLength + 2 * indent, statisticsFontHeight);      this.g.setColor(this.bgColor);    }    g.drawString(eStr, x += indent, y, TOP_LEFT);  }  /**   * Return if problem encountered while executing selected test is a failure or   * an error.   *    * @return <code>true</code> if problem encountered while executing selected   *         test is a failure <code>false</code> otherwise.   * @since 1.0   */  public boolean getFailureListType()  {    return this.failureListType;  }  /**   * Sets type of tests list to display.   *    * @param failureListType   *          if <code>true</code> shows list of tests that fails if there are   *          some, list of error tests if there are some otherwise.   * @since 1.0   */  public void setFailureListType(boolean failureListType)  {    if (failureListType)    {      if (this.hasFailures)      {        this.failureListType = true;        this.show();        this.repaint();      }    } else if (this.hasErrors)    {      this.failureListType = false;      this.show();      this.repaint();    }  }  /**   * Returns error thrown while executing selected test.   *    * @return error thrown while executing selected test.   * @since 1.0   */  public Throwable getSelectedError()  {    Throwable res = null;    if (this.failureListType)    {      if (this.hasFailures) res = (Throwable) this.failures          .elementAt(this.failTests.getSelectedIndex());    } else if (this.hasErrors) res = (Throwable) this.errors        .elementAt(this.errorTests.getSelectedIndex());    return res;  }  /**   * Shows list o tests.   *    * @since 1.0   */  private void showTests()  {    if (this.hasErrors || this.hasFailures) (this.failureListType ? this.failTests        : this.errorTests).show(this.g);  }  /**   * Shows separator.   *    * @param y   * @since 1.0   */  private void showSeparator(int y)  {    int color = this.bgColor;    if (this.hasErrors || this.hasFailures) color = this.failureListType ? this.failureColor        : this.errorColor;    g.setColor(color);    g.drawLine(MARGIN, y, this.width - MARGIN - MARGIN, y);  }  /**   * Shows descriptive message of selected test.   *    * @param x   * @param y   * @since 1.0   */  private void showMessage(int x, int y)  {    Throwable t = this.getSelectedError();    if (t != null)    {      g.setColor(this.fgColor);      g.setFont(this.font);      this.msgWrapper.setString(getMessage(t));      for (; this.msgWrapper.hasMoreElements() && y < this.height; y += fontHeight)        g.drawString((String) this.msgWrapper.nextElement(), x, y, TOP_LEFT);    }  }  /**   * Returns descriptive message based on exception thrown.   *    * @param ex   *          exception thrown.   * @return descriptive message based on exception thrown.   * @since 1.0   */  public static String getMessage(Throwable ex)  {    return ((!(ex instanceof AssertionFailedError)) ? ex.getClass().getName()        + ": " : "")        + ex.getMessage();  }  /**   * Shows screen.   *    * @since 1.0   */  private void show()  {    g.setColor(this.bgColor);    g.fillRect(0, 0, this.width, this.height);    int y = 0;    this.showProgressBar(MARGIN, y, this.width - MARGIN - MARGIN,        PROGRESSBAR_HEIGHT);    this.showStatistics(y += PROGRESSBAR_HEIGHT);    this.showTests();    this        .showSeparator(y += (statisticsFontHeight + this.failTests.getHeight() + 2));    this.showMessage(0, y += 2);  }  /*   * (non-Javadoc)   *    * @see momeunit.framework.TestListener#addError(momeunit.framework.Test,   *      java.lang.Throwable)   */  public void addError(Test test, Throwable t)  {    this.hasErrors = true;    if (!this.hasFailures) this.failureListType = false;    this.errorTests.append(((TestCase) test).getName(), this.font);    this.errors.addElement(t);    if (this.printToStdErr)    {      System.err.println("Error processing test \""          + ((TestCase) test).getName() + "\"\n  " + t.getClass().getName()          + ": " + t.getMessage());      if (this.printStackTrace) t.printStackTrace();    }  }  /*   * (non-Javadoc)   *    * @see momeunit.framework.TestListener#addFailure(momeunit.framework.Test,   *      momeunit.framework.AssertionFailedError)   */  public void addFailure(Test test, AssertionFailedError t)  {    this.hasFailures = true;    this.failureListType = true;    this.failTests.append(((TestCase) test).getName(), this.font);    this.failures.addElement(t);    if (this.printToStdErr)    {      System.err.println("Test \"" + test + "\" failed:\n  " + t.getMessage());      if (this.printStackTrace) t.printStackTrace();    }  }  /*   * (non-Javadoc)   *    * @see momeunit.framework.TestListener#endTest(momeunit.framework.Test)   */  public void endTest(Test test)  {    this.show();    this.repaint();  }  /*   * (non-Javadoc)   *    * @see momeunit.framework.TestListener#startTest(momeunit.framework.Test)   */  public void startTest(Test test)  {    this.lastTest = ((TestCase) test).getName();  }  /**   * Returns name of last started test.   *    * @return the name of last started test.   * @since 1.1.1   */  public String getLastTestName()  {    return this.lastTest;  }  /*   * (non-Javadoc)   *    * @see javax.microedition.lcdui.Canvas#keyPressed(int)   */  protected void keyPressed(int key)  {    switch (this.getGameAction(key))    {    case Canvas.LEFT:    case Canvas.RIGHT:      this.setFailureListType(!this.failureListType);      break;    case Canvas.DOWN:      ListShow ls = (this.failureListType) ? this.failTests : this.errorTests;      if (ls.next())      {        this.show();        this.repaint();      }      break;    case Canvas.UP:      ls = (this.failureListType) ? this.failTests : this.errorTests;      if (ls.prev())      {        this.show();        this.repaint();      }      break;    case Canvas.FIRE:      Throwable failure = this.getSelectedError();      if (failure != null)      {        System.err.println(getMessage(failure));        if (this.printStackTrace) failure.printStackTrace();      }      break;    }  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲高清一区| 久久久久久综合| 国产视频视频一区| 亚洲成人免费看| aaa国产一区| 精品国产伦理网| 图片区小说区国产精品视频| 不卡的av网站| 国产女同互慰高潮91漫画| 视频一区二区欧美| 在线观看日韩国产| 亚洲天堂av老司机| 粗大黑人巨茎大战欧美成人| 日韩片之四级片| 天堂av在线一区| 欧美视频在线播放| 一区二区三区四区亚洲| 97精品视频在线观看自产线路二| 久久综合九色欧美综合狠狠| 免费成人深夜小野草| 欧美三级在线播放| 亚洲福利视频一区二区| 精品视频在线看| 亚洲综合丁香婷婷六月香| av色综合久久天堂av综合| 日本一区二区综合亚洲| 国产成人av网站| 欧美精彩视频一区二区三区| 国内成人精品2018免费看| 欧美精品一区二区在线播放| 蓝色福利精品导航| 欧美不卡一区二区三区四区| 久久99国产精品免费网站| 精品免费国产一区二区三区四区| 韩国三级在线一区| 久久蜜桃av一区二区天堂 | 日韩精品一区二区三区在线| 日本视频一区二区三区| 欧美一级理论片| 久久99在线观看| 久久久久久综合| av电影在线观看不卡 | 欧美tk—视频vk| 精品一区二区三区在线播放| 精品美女在线观看| 国产成人高清在线| 玉米视频成人免费看| 欧美日韩激情一区| 久久精品久久精品| 久久久久九九视频| 91香蕉视频污在线| 天堂va蜜桃一区二区三区| 精品国产麻豆免费人成网站| 大美女一区二区三区| 一区二区三区中文免费| 欧美精品免费视频| 国产一区二区三区综合| 亚洲私人影院在线观看| 欧美日本乱大交xxxxx| 麻豆国产精品777777在线| 中文字幕精品三区| 欧美午夜在线一二页| 久久99热99| 玉足女爽爽91| 久久久久国产精品人| 色菇凉天天综合网| 美女脱光内衣内裤视频久久网站 | 激情偷乱视频一区二区三区| 中文字幕日韩av资源站| 91精品啪在线观看国产60岁| 不卡的av网站| 激情综合五月天| 亚洲自拍另类综合| 久久久久久久久蜜桃| 欧美性生交片4| 国产成人一区在线| 日日夜夜免费精品| 亚洲色图在线视频| 2021国产精品久久精品| 欧美色网一区二区| 国产乱妇无码大片在线观看| 亚洲不卡一区二区三区| 中文字幕免费观看一区| 51久久夜色精品国产麻豆| 成人国产精品免费观看视频| 日本免费新一区视频| 亚洲蜜桃精久久久久久久| 欧美韩国日本综合| 日韩欧美色综合| 欧美日韩免费电影| 色婷婷久久综合| 99在线精品免费| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 在线综合+亚洲+欧美中文字幕| 99久久综合99久久综合网站| 国内外成人在线| 日韩精品免费专区| 亚洲国产日韩在线一区模特| 亚洲欧美日本在线| 国产精品电影一区二区| 久久久久久久久久久久久女国产乱 | 3d动漫精品啪啪一区二区竹菊| 91福利小视频| 91丨porny丨最新| 成人av免费网站| 高清不卡在线观看| 国产大片一区二区| 国产精品2024| 国产精品18久久久久| 精品一区二区三区在线播放 | 亚洲成人av一区| 亚洲图片一区二区| 亚洲综合清纯丝袜自拍| 亚洲精品视频免费看| 亚洲欧美另类久久久精品| 亚洲欧洲日韩av| 一区二区三区久久| 亚洲一区二区三区四区在线| 亚洲国产视频直播| 欧美aaa在线| 国产一区二区三区精品视频| 国产在线视频一区二区| 国产成人免费视频网站 | 色吧成人激情小说| 日本精品视频一区二区| 欧美系列亚洲系列| 欧美一区二区三区免费在线看| 欧美日韩高清影院| 欧美一级艳片视频免费观看| 欧美变态tickle挠乳网站| 久久嫩草精品久久久久| 国产精品亲子乱子伦xxxx裸| 亚洲人成在线观看一区二区| 亚洲最色的网站| 麻豆成人91精品二区三区| 国产99精品国产| 色婷婷久久久久swag精品| 欧美一区永久视频免费观看| 精品99一区二区| 一区在线中文字幕| 日韩av中文字幕一区二区三区| 国产精品小仙女| 91行情网站电视在线观看高清版| 欧美精品在线观看播放| 国产天堂亚洲国产碰碰| 亚洲精品视频自拍| 久久99精品国产.久久久久久| 成人精品电影在线观看| 欧美色图激情小说| 91久久精品一区二区二区| 777亚洲妇女| 国产精品欧美一区二区三区| 亚洲午夜一区二区| 国产精品一二三| 欧美伊人久久大香线蕉综合69| 日韩欧美123| 亚洲人成人一区二区在线观看| 日韩经典一区二区| 成人aaaa免费全部观看| 91麻豆精品国产91久久久久久| 国产精品视频线看| 男女男精品网站| 色婷婷精品大在线视频| 久久久蜜臀国产一区二区| 一区二区三区免费看视频| 国产一区二区剧情av在线| 91久久免费观看| 欧美国产欧美综合| 黄一区二区三区| 欧美精品在线一区二区三区| 中文字幕一区二区三区精华液| 狠狠色综合播放一区二区| 欧美日韩国产在线观看| 亚洲欧洲av一区二区三区久久| 久久国产精品色婷婷| 精品污污网站免费看| 亚洲欧洲成人精品av97| 国产精品一区在线观看乱码| 日韩一区二区视频| 亚洲二区视频在线| 色综合 综合色| 国产精品福利一区二区三区| 国产精品99精品久久免费| 日韩欧美另类在线| 免费成人在线观看| 91精品欧美久久久久久动漫| 亚洲午夜激情网页| 色狠狠色狠狠综合| 亚洲精品videosex极品| 成人福利视频网站| 中文欧美字幕免费| 成人禁用看黄a在线| 国产精品美女一区二区三区| 国产毛片一区二区| 久久久一区二区三区| 国产毛片精品视频| 久久免费看少妇高潮| 成人在线综合网| 国产精品福利在线播放| 91麻豆高清视频|