Mercurial > jhg
diff cmdline/org/tmatesoft/hg/console/Main.java @ 478:e74580e24feb
Test for subprogress
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Thu, 12 Jul 2012 19:11:12 +0200 |
parents | 9c9d09111aee |
children | 59b7c817bc4d |
line wrap: on
line diff
--- a/cmdline/org/tmatesoft/hg/console/Main.java Thu Jul 12 18:07:51 2012 +0200 +++ b/cmdline/org/tmatesoft/hg/console/Main.java Thu Jul 12 19:11:12 2012 +0200 @@ -106,7 +106,6 @@ public static void main(String[] args) throws Exception { Main m = new Main(args); // m.checkWalkFileRevisions(); -// m.checkSubProgress(); // m.buildFileLog(); // m.testConsoleLog(); // m.testTreeTraversal(); @@ -134,42 +133,6 @@ // hg --debug manifest --rev 150 | grep cmdline/org/tmatesoft/hg/console/Main.java hgRepo.getManifest().walkFileRevisions(Path.create("cmdline/org/tmatesoft/hg/console/Main.java"), new ManifestDump(), 100, 150, 200, 210, 300); } - - // no repo - // FIXME as test, perhaps in TestAuxUtilities - private void checkSubProgress() { - ProgressSupport ps = new ProgressSupport() { - private int units; - - public void start(int totalUnits) { - units = totalUnits; - System.out.printf("%d:", totalUnits); - - } - public void worked(int wu) { - for (int i = 0; i < wu; i++) { - System.out.print(units-- == 0 ? '!' : '.'); - } - } - public void done() { - System.out.println("DONE"); - } - }; - ps.start(10); - ProgressSupport.Sub s1 = new ProgressSupport.Sub(ps, 3); - ProgressSupport.Sub s2 = new ProgressSupport.Sub(ps, 7); - s1.start(10); - s1.worked(1); - s1.worked(2); - s1.worked(3); - s1.worked(4); - s1.done(); - // - s2.start(5); - s2.worked(3); - s2.worked(2); - s2.done(); - } private void buildFileLog() throws Exception { final long start = System.nanoTime();