Examples of compare()


Examples of org.tmatesoft.hg.internal.RepositoryComparator.compare()

      final HgChangelog clog = repo.getChangelog();
      final HgParentChildMap<HgChangelog> parentHelper = new HgParentChildMap<HgChangelog>(clog);
      parentHelper.init();
      final RepositoryComparator comparator = new RepositoryComparator(parentHelper, remote);
      // get incoming revisions
      comparator.compare(new ProgressSupport.Sub(progress, 50), getCancelSupport(null, true));
      final List<Nodeid> common = comparator.getCommon();
      // get bundle with changes from remote
      HgBundle incoming = remote.getChanges(common);
      //
      // add revisions to changelog, manifest, files
View Full Code Here

Examples of org.vietspider.html.renderer.NodeComparator.compare()

    int counter = 1;
    int onlyLinkCounter = onlyLink(node) ? 1 : 0;
    for(int i = 1; i < list.size(); i++) {
      HTMLNode n = list.get(i);
      if(onlyLink(n)) onlyLinkCounter++;
      if(!nodeComparator.compare(node, n)) continue;
      counter++;
    }
   
    int rate = (counter*100)/list.size();
    if(rate >= 85) return true;
View Full Code Here

Examples of org.wicketstuff.jamon.web.PropertyModelObjectComparator.compare()

public class PropertyModelObjectComparatorTest {
    @Test
    public void shouldReturnZeroIfObjectsAreEqual() {
        PropertyModelObjectComparator ascComparator = new PropertyModelObjectComparator(true, "name");
        assertEquals(0, ascComparator.compare(new PropertyModelObject("ben"), new PropertyModelObject("ben")));

        PropertyModelObjectComparator descComparator = new PropertyModelObjectComparator(false, "name");
        assertEquals(0, descComparator.compare(new PropertyModelObject("ben"), new PropertyModelObject("ben")));
    }
   
View Full Code Here

Examples of org.xmlBlaster.engine.runlevel.PluginConfigComparator.compare()

      config2.addAction(action);
    
      int cmp = upComparator.compare(config1, config2);
      assertTrue(me + " number of actions", cmp < 0);

      cmp = downComparator.compare(config1, config2);
      assertTrue(me + " number of actions", cmp > 0);

      PluginConfig config3 = new PluginConfig(this.glob, "test:PLUGIN3", true, "org.universe.Plugin3");
      action = new RunLevelAction(this.glob, "LOAD", 2, -1, null, 3);
      config3.addAction(action);
View Full Code Here

Examples of org.xwiki.test.ui.po.HistoryPane.compare()

    @Test
    public void testNoChanges()
    {
        HistoryPane historyTab = testPage.openHistoryDocExtraPane();
        String currentVersion = historyTab.getCurrentVersion();
        Assert.assertTrue(historyTab.compare(currentVersion, currentVersion).getChangesPane().hasNoChanges());
    }

    /**
     * Tests that the unified diff (for multi-line text) shows the inline changes.
     */
 
View Full Code Here

Examples of org.zkoss.ztl.util.image.Comparator.compare()

            testBuffImg.getHeight() - (sizes[0] + sizes[2]));

                Comparator ic = comparator == null ? new DefaultComparator(base.getWidth()/configHelper.getGranularity(),
                    base.getHeight()/configHelper.getGranularity(), configHelper.getLeniency()):
                                comparator;
                BufferedImage imgc = ic.compare(base, test);
                if (imgc != null) {
                  File subDir = new File(resultDirStr + File.separator + caseID);
                  if (!subDir.isDirectory())
                    subDir.mkdir();
                  subDir = new File(subDir, caseID + "_" + browserName + "_result" + postfix);
View Full Code Here

Examples of sun.security.util.ByteArrayLexOrder.compare()

            if (r.nextInt() % 1 == 0) {
                a[r.nextInt(a.length)] = (byte)r.nextInt(128);
            } else {
                b[r.nextInt(a.length)] = (byte)r.nextInt(128);
            }
            if (c.compare(a, b) != d.compare(a, b)) {
                StringBuilder sb = new StringBuilder();
                for (byte bi : a) {
                    sb.append(bi).append(',');
                }
                sb.append('\n');
View Full Code Here

Examples of test.interop.util.XMLComparatorInterop.compare()

            javax.xml.stream.XMLStreamReader parser = StAXUtils.createXMLStreamReader(stream);
            OMXMLParserWrapper builder = new StAXSOAPModelBuilder(parser, null);
            SOAPEnvelope resEnv = (SOAPEnvelope) builder.getDocumentElement();
            OMElement resElementtobe = resEnv.getBody().getFirstElement();
            XMLComparatorInterop comparator = new XMLComparatorInterop();
            compare = comparator.compare(retEle,resElementtobe);
        }
        return compare;
    }

View Full Code Here

Examples of ucar.nc2.util.CompareNetcdf2.compare()

    NetcdfFile ncfile = NetcdfDataset.openFile(file, null);
    NetcdfFile ncfileRemote = new CdmRemote(remote);

    Formatter f= new Formatter();
    CompareNetcdf2 cn = new CompareNetcdf2(f, false, false, false);
    boolean ok = cn.compare(ncfile, ncfileRemote);
    if (ok)
      System.out.printf("compare %s ok %n", file);
    else
      System.out.printf("compare %s NOT OK %n%s", file, f.toString());
    ncfile.close();
View Full Code Here

Examples of voldemort.versioning.VectorClock.compare()

        store.put(aKey, new Versioned<byte[]>(getValue(), clock), aTransform);
        List<Versioned<byte[]>> found = store.get(aKey, aTransform);
        assertEquals("Invalid number of items found.", 1, found.size());
        assertEquals("Version not incremented properly",
                     Occurred.BEFORE,
                     copy.compare(found.get(0).getVersion()));
    }

    @Test
    public void testPutIncrementsVersionZZZ() throws Exception {
        Store<ByteArray, byte[], byte[]> store = getZonedStore();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.