< prev index next >

## src/com/sun/javatest/cof/COFTest.java

Print this page

    *** 114,130 ****
          private static DateFormat[] dateFormats;
          protected final static Pattern idPattern = Pattern.compile(".*[^\\w\\.\\[\\]\\(\\)\\{\\},_\\-]([\\w\\.\\[\\]\\(\\)\\{\\},_\\-]+)");
          static boolean noTestCases = false;
          protected final static Pattern testCasePattern = Pattern //.compile("^(\\S+): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)");
                  .compile("^(.*): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)");
    !     static LinkedHashMap xmlAttributes;
    !     static LinkedHashMap xmlElements;
          static String xmlTagName;

          static {
    !         xmlElements = new LinkedHashMap();
    !         xmlAttributes = new LinkedHashMap();
              xmlElements.put("name", "name");
              xmlElements.put("appuse", "appuse");
              xmlElements.put("status", "status");
              xmlElements.put("testcases", "testcases");
              xmlElements.put("starttime", "starttime");
    --- 114,130 ----
          private static DateFormat[] dateFormats;
          protected final static Pattern idPattern = Pattern.compile(".*[^\\w\\.\\[\\]\\(\\)\\{\\},_\\-]([\\w\\.\\[\\]\\(\\)\\{\\},_\\-]+)");
          static boolean noTestCases = false;
          protected final static Pattern testCasePattern = Pattern //.compile("^(\\S+): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)");
                  .compile("^(.*): (Passed\\.|Failed\\.|Error\\.|Not\\ run\\.)(.*)");
    !     static LinkedHashMap<String, String> xmlAttributes;
    !     static LinkedHashMap<String, String> xmlElements;
          static String xmlTagName;

          static {
    !         xmlElements = new LinkedHashMap<>();
    !         xmlAttributes = new LinkedHashMap<>();
              xmlElements.put("name", "name");
              xmlElements.put("appuse", "appuse");
              xmlElements.put("status", "status");
              xmlElements.put("testcases", "testcases");
              xmlElements.put("starttime", "starttime");
    *** 145,155 ****
              cofStatus[Status.NOT_RUN] = "did_not_run";
          }
          //    @XmlAttribute
          protected String analysis;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
    !     protected List/*<String>*/ appuse;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
          protected COFTestAttributes attributes;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
          protected String description;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", type = String.class)
    --- 145,155 ----
              cofStatus[Status.NOT_RUN] = "did_not_run";
          }
          //    @XmlAttribute
          protected String analysis;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", required = true)
    !     protected List<String> appuse;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
          protected COFTestAttributes attributes;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema")
          protected String description;
          //    @XmlElement(namespace = "http://qare.sfbay.sun.com/projects/COF/2003/2_0_2/Schema", type = String.class)
    *** 261,272 ****
              if (mtl == null) {
                  // mtl is not specified
                  return;
              }

    !         List  /*<COFTestCase>*/ jtrCases = testcases.getTestcase();
    !         List  /*<String>*/ mtlTestCases = mtl.getTestCases(tr.getTestName());
              if (mtlTestCases != null && mtlTestCases.size() > 0) {
                  // for (COFTestCase jtrCase : jtrCases) {
                  Iterator it = jtrCases.iterator();
                  while (it.hasNext()) {
                      COFTestCase jtrCase = (COFTestCase) it.next();
    --- 261,272 ----
              if (mtl == null) {
                  // mtl is not specified
                  return;
              }

    !         List  <COFTestCase> jtrCases = testcases.getTestcase();
    !         List  <String> mtlTestCases = mtl.getTestCases(tr.getTestName());
              if (mtlTestCases != null && mtlTestCases.size() > 0) {
                  // for (COFTestCase jtrCase : jtrCases) {
                  Iterator it = jtrCases.iterator();
                  while (it.hasNext()) {
                      COFTestCase jtrCase = (COFTestCase) it.next();
    *** 281,291 ****
                          COFStatus nStatus = new COFStatus();
                          nTc.setName(testCaseName);
                          String strS = cofStatus[tr.getStatus().getType()];
                          nStatus.setValue(strS);
                          //System.out.println("+ " + tr.getTestName() + " " + tcName + " " + strS );
    !                     testcases.getTestcase().add(testCaseName);
                      }
                  }
              }
          }

    --- 281,291 ----
                          COFStatus nStatus = new COFStatus();
                          nTc.setName(testCaseName);
                          String strS = cofStatus[tr.getStatus().getType()];
                          nStatus.setValue(strS);
                          //System.out.println("+ " + tr.getTestName() + " " + tcName + " " + strS );
    !                     testcases.getTestcase().add(nTc);
                      }
                  }
              }
          }

    *** 325,337 ****
           * Objects of the following type(s) are allowed in the list
           * {@link String }
           *
           *
           */
    !     public List/*<String>*/ getAppuse() {
              if (appuse == null) {
    !             appuse = new ArrayList/*<String>*/();
              }
              return this.appuse;
          }

          /**
    --- 325,337 ----
           * Objects of the following type(s) are allowed in the list
           * {@link String }
           *
           *
           */
    !     public List<String> getAppuse() {
              if (appuse == null) {
    !             appuse = new ArrayList<>();
              }
              return this.appuse;
          }

          /**
    *** 392,406 ****
                  id = "test:" + idNum;
              }
              return id;
          }

    !     LinkedHashMap getItemAttributes() {
              return xmlAttributes;
          }

    !     LinkedHashMap getItemElements() {
              return xmlElements;
          }

          String getItemTagName() {
              return xmlTagName;
    --- 392,406 ----
                  id = "test:" + idNum;
              }
              return id;
          }

    !     LinkedHashMap<String, String> getItemAttributes() {
              return xmlAttributes;
          }

    !     LinkedHashMap<String, String> getItemElements() {
              return xmlElements;
          }

          String getItemTagName() {
              return xmlTagName;
    *** 464,474 ****
           */
          //  public void setId(String value) {
          //          this.id = value;
          //  }
          private static void initDateFormats() {
    !         Vector v = new Vector();

              // generic Java default
              // 10-Sep-99 3:25:11 PM
              v.addElement(DateFormat.getDateTimeInstance());

    --- 464,474 ----
           */
          //  public void setId(String value) {
          //          this.id = value;
          //  }
          private static void initDateFormats() {
    !         Vector<DateFormat> v = new Vector<>();

              // generic Java default
              // 10-Sep-99 3:25:11 PM
              v.addElement(DateFormat.getDateTimeInstance());

< prev index next >