ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/CountedCompleterTest.java
(Generate patch)

Comparing jsr166/src/test/tck/CountedCompleterTest.java (file contents):
Revision 1.5 by jsr166, Tue Apr 16 05:49:18 2013 UTC vs.
Revision 1.6 by jsr166, Mon Jun 3 16:46:12 2013 UTC

# Line 524 | Line 524 | public class CountedCompleterTest extend
524       * completed tasks; getRawResult returns null.
525       */
526      public void testInvoke() {
527 <       ForkJoinTask a = new CheckedFJTask() {
527 >        ForkJoinTask a = new CheckedFJTask() {
528              public void realCompute() {
529                  CCF f = new LCCF(null, 8);
530                  assertNull(f.invoke());
# Line 540 | Line 540 | public class CountedCompleterTest extend
540       * completed tasks
541       */
542      public void testQuietlyInvoke() {
543 <       ForkJoinTask a = new CheckedFJTask() {
543 >        ForkJoinTask a = new CheckedFJTask() {
544              public void realCompute() {
545                  CCF f = new LCCF(null, 8);
546                  f.quietlyInvoke();
# Line 554 | Line 554 | public class CountedCompleterTest extend
554       * join of a forked task returns when task completes
555       */
556      public void testForkJoin() {
557 <       ForkJoinTask a = new CheckedFJTask() {
557 >        ForkJoinTask a = new CheckedFJTask() {
558              public void realCompute() {
559                  CCF f = new LCCF(null, 8);
560                  assertSame(f, f.fork());
# Line 569 | Line 569 | public class CountedCompleterTest extend
569       * get of a forked task returns when task completes
570       */
571      public void testForkGet() {
572 <       ForkJoinTask a = new CheckedFJTask() {
572 >        ForkJoinTask a = new CheckedFJTask() {
573              public void realCompute() throws Exception {
574                  CCF f = new LCCF(null, 8);
575                  assertSame(f, f.fork());
# Line 584 | Line 584 | public class CountedCompleterTest extend
584       * timed get of a forked task returns when task completes
585       */
586      public void testForkTimedGet() {
587 <       ForkJoinTask a = new CheckedFJTask() {
587 >        ForkJoinTask a = new CheckedFJTask() {
588              public void realCompute() throws Exception {
589                  CCF f = new LCCF(null, 8);
590                  assertSame(f, f.fork());
# Line 599 | Line 599 | public class CountedCompleterTest extend
599       * timed get with null time unit throws NPE
600       */
601      public void testForkTimedGetNPE() {
602 <       ForkJoinTask a = new CheckedFJTask() {
602 >        ForkJoinTask a = new CheckedFJTask() {
603              public void realCompute() throws Exception {
604                  CCF f = new LCCF(null, 8);
605                  assertSame(f, f.fork());
# Line 615 | Line 615 | public class CountedCompleterTest extend
615       * quietlyJoin of a forked task returns when task completes
616       */
617      public void testForkQuietlyJoin() {
618 <       ForkJoinTask a = new CheckedFJTask() {
618 >        ForkJoinTask a = new CheckedFJTask() {
619              public void realCompute() {
620                  CCF f = new LCCF(null, 8);
621                  assertSame(f, f.fork());
# Line 631 | Line 631 | public class CountedCompleterTest extend
631       * getQueuedTaskCount returns 0 when quiescent
632       */
633      public void testForkHelpQuiesce() {
634 <       ForkJoinTask a = new CheckedFJTask() {
634 >        ForkJoinTask a = new CheckedFJTask() {
635              public void realCompute() {
636                  CCF f = new LCCF(null, 8);
637                  assertSame(f, f.fork());
# Line 647 | Line 647 | public class CountedCompleterTest extend
647       * invoke task throws exception when task completes abnormally
648       */
649      public void testAbnormalInvoke() {
650 <       ForkJoinTask a = new CheckedFJTask() {
650 >        ForkJoinTask a = new CheckedFJTask() {
651              public void realCompute() {
652                  FailingCCF f = new LFCCF(null, 8);
653                  try {
# Line 664 | Line 664 | public class CountedCompleterTest extend
664       * quietlyInvoke task returns when task completes abnormally
665       */
666      public void testAbnormalQuietlyInvoke() {
667 <       ForkJoinTask a = new CheckedFJTask() {
667 >        ForkJoinTask a = new CheckedFJTask() {
668              public void realCompute() {
669                  FailingCCF f = new LFCCF(null, 8);
670                  f.quietlyInvoke();
# Line 678 | Line 678 | public class CountedCompleterTest extend
678       * join of a forked task throws exception when task completes abnormally
679       */
680      public void testAbnormalForkJoin() {
681 <       ForkJoinTask a = new CheckedFJTask() {
681 >        ForkJoinTask a = new CheckedFJTask() {
682              public void realCompute() {
683                  FailingCCF f = new LFCCF(null, 8);
684                  assertSame(f, f.fork());
# Line 696 | Line 696 | public class CountedCompleterTest extend
696       * get of a forked task throws exception when task completes abnormally
697       */
698      public void testAbnormalForkGet() {
699 <       ForkJoinTask a = new CheckedFJTask() {
699 >        ForkJoinTask a = new CheckedFJTask() {
700              public void realCompute() throws Exception {
701                  FailingCCF f = new LFCCF(null, 8);
702                  assertSame(f, f.fork());
# Line 716 | Line 716 | public class CountedCompleterTest extend
716       * timed get of a forked task throws exception when task completes abnormally
717       */
718      public void testAbnormalForkTimedGet() {
719 <       ForkJoinTask a = new CheckedFJTask() {
719 >        ForkJoinTask a = new CheckedFJTask() {
720              public void realCompute() throws Exception {
721                  FailingCCF f = new LFCCF(null, 8);
722                  assertSame(f, f.fork());
# Line 736 | Line 736 | public class CountedCompleterTest extend
736       * quietlyJoin of a forked task returns when task completes abnormally
737       */
738      public void testAbnormalForkQuietlyJoin() {
739 <       ForkJoinTask a = new CheckedFJTask() {
739 >        ForkJoinTask a = new CheckedFJTask() {
740              public void realCompute() {
741                  FailingCCF f = new LFCCF(null, 8);
742                  assertSame(f, f.fork());
# Line 751 | Line 751 | public class CountedCompleterTest extend
751       * invoke task throws exception when task cancelled
752       */
753      public void testCancelledInvoke() {
754 <       ForkJoinTask a = new CheckedFJTask() {
754 >        ForkJoinTask a = new CheckedFJTask() {
755              public void realCompute() {
756                  CCF f = new LCCF(null, 8);
757                  assertTrue(f.cancel(true));
# Line 769 | Line 769 | public class CountedCompleterTest extend
769       * join of a forked task throws exception when task cancelled
770       */
771      public void testCancelledForkJoin() {
772 <       ForkJoinTask a = new CheckedFJTask() {
772 >        ForkJoinTask a = new CheckedFJTask() {
773              public void realCompute() {
774                  CCF f = new LCCF(null, 8);
775                  assertTrue(f.cancel(true));
# Line 788 | Line 788 | public class CountedCompleterTest extend
788       * get of a forked task throws exception when task cancelled
789       */
790      public void testCancelledForkGet() {
791 <       ForkJoinTask a = new CheckedFJTask() {
791 >        ForkJoinTask a = new CheckedFJTask() {
792              public void realCompute() throws Exception {
793                  CCF f = new LCCF(null, 8);
794                  assertTrue(f.cancel(true));
# Line 807 | Line 807 | public class CountedCompleterTest extend
807       * timed get of a forked task throws exception when task cancelled
808       */
809      public void testCancelledForkTimedGet() throws Exception {
810 <       ForkJoinTask a = new CheckedFJTask() {
810 >        ForkJoinTask a = new CheckedFJTask() {
811              public void realCompute() throws Exception {
812                  CCF f = new LCCF(null, 8);
813                  assertTrue(f.cancel(true));
# Line 826 | Line 826 | public class CountedCompleterTest extend
826       * quietlyJoin of a forked task returns when task cancelled
827       */
828      public void testCancelledForkQuietlyJoin() {
829 <       ForkJoinTask a = new CheckedFJTask() {
829 >        ForkJoinTask a = new CheckedFJTask() {
830              public void realCompute() {
831                  CCF f = new LCCF(null, 8);
832                  assertTrue(f.cancel(true));
# Line 842 | Line 842 | public class CountedCompleterTest extend
842       */
843      public void testGetPool() {
844          final ForkJoinPool mainPool = mainPool();
845 <       ForkJoinTask a = new CheckedFJTask() {
845 >        ForkJoinTask a = new CheckedFJTask() {
846              public void realCompute() {
847                  assertSame(mainPool, getPool());
848              }};
# Line 853 | Line 853 | public class CountedCompleterTest extend
853       * getPool of non-FJ task returns null
854       */
855      public void testGetPool2() {
856 <       ForkJoinTask a = new CheckedFJTask() {
856 >        ForkJoinTask a = new CheckedFJTask() {
857              public void realCompute() {
858                  assertNull(getPool());
859              }};
# Line 864 | Line 864 | public class CountedCompleterTest extend
864       * inForkJoinPool of executing task returns true
865       */
866      public void testInForkJoinPool() {
867 <       ForkJoinTask a = new CheckedFJTask() {
867 >        ForkJoinTask a = new CheckedFJTask() {
868              public void realCompute() {
869                  assertTrue(inForkJoinPool());
870              }};
# Line 875 | Line 875 | public class CountedCompleterTest extend
875       * inForkJoinPool of non-FJ task returns false
876       */
877      public void testInForkJoinPool2() {
878 <       ForkJoinTask a = new CheckedFJTask() {
878 >        ForkJoinTask a = new CheckedFJTask() {
879              public void realCompute() {
880                  assertFalse(inForkJoinPool());
881              }};
# Line 886 | Line 886 | public class CountedCompleterTest extend
886       * setRawResult(null) succeeds
887       */
888      public void testSetRawResult() {
889 <       ForkJoinTask a = new CheckedFJTask() {
889 >        ForkJoinTask a = new CheckedFJTask() {
890              public void realCompute() {
891                  setRawResult(null);
892                  assertNull(getRawResult());
# Line 898 | Line 898 | public class CountedCompleterTest extend
898       * invoke task throws exception after invoking completeExceptionally
899       */
900      public void testCompleteExceptionally2() {
901 <       ForkJoinTask a = new CheckedFJTask() {
901 >        ForkJoinTask a = new CheckedFJTask() {
902              public void realCompute() {
903                  CCF f = new LCCF(null, 8);
904                  f.completeExceptionally(new FJException());
# Line 916 | Line 916 | public class CountedCompleterTest extend
916       * invokeAll(t1, t2) invokes all task arguments
917       */
918      public void testInvokeAll2() {
919 <       ForkJoinTask a = new CheckedFJTask() {
919 >        ForkJoinTask a = new CheckedFJTask() {
920              public void realCompute() {
921                  CCF f = new LCCF(null, 8);
922                  CCF g = new LCCF(null, 9);
# Line 933 | Line 933 | public class CountedCompleterTest extend
933       * invokeAll(tasks) with 1 argument invokes task
934       */
935      public void testInvokeAll1() {
936 <       ForkJoinTask a = new CheckedFJTask() {
936 >        ForkJoinTask a = new CheckedFJTask() {
937              public void realCompute() {
938                  CCF f = new LCCF(null, 8);
939                  invokeAll(f);
# Line 947 | Line 947 | public class CountedCompleterTest extend
947       * invokeAll(tasks) with > 2 argument invokes tasks
948       */
949      public void testInvokeAll3() {
950 <       ForkJoinTask a = new CheckedFJTask() {
950 >        ForkJoinTask a = new CheckedFJTask() {
951              public void realCompute() {
952                  CCF f = new LCCF(null, 8);
953                  CCF g = new LCCF(null, 9);
# Line 967 | Line 967 | public class CountedCompleterTest extend
967       * invokeAll(collection) invokes all tasks in the collection
968       */
969      public void testInvokeAllCollection() {
970 <       ForkJoinTask a = new CheckedFJTask() {
970 >        ForkJoinTask a = new CheckedFJTask() {
971              public void realCompute() {
972                  CCF f = new LCCF(null, 8);
973                  CCF g = new LCCF(null, 9);
# Line 991 | Line 991 | public class CountedCompleterTest extend
991       * invokeAll(tasks) with any null task throws NPE
992       */
993      public void testInvokeAllNPE() {
994 <       ForkJoinTask a = new CheckedFJTask() {
994 >        ForkJoinTask a = new CheckedFJTask() {
995              public void realCompute() {
996                  CCF f = new LCCF(null, 8);
997                  CCF g = new LCCF(null, 9);
# Line 1008 | Line 1008 | public class CountedCompleterTest extend
1008       * invokeAll(t1, t2) throw exception if any task does
1009       */
1010      public void testAbnormalInvokeAll2() {
1011 <       ForkJoinTask a = new CheckedFJTask() {
1011 >        ForkJoinTask a = new CheckedFJTask() {
1012              public void realCompute() {
1013                  CCF f = new LCCF(null, 8);
1014                  FailingCCF g = new LFCCF(null, 9);
# Line 1026 | Line 1026 | public class CountedCompleterTest extend
1026       * invokeAll(tasks) with 1 argument throws exception if task does
1027       */
1028      public void testAbnormalInvokeAll1() {
1029 <       ForkJoinTask a = new CheckedFJTask() {
1029 >        ForkJoinTask a = new CheckedFJTask() {
1030              public void realCompute() {
1031                  FailingCCF g = new LFCCF(null, 9);
1032                  try {
# Line 1043 | Line 1043 | public class CountedCompleterTest extend
1043       * invokeAll(tasks) with > 2 argument throws exception if any task does
1044       */
1045      public void testAbnormalInvokeAll3() {
1046 <       ForkJoinTask a = new CheckedFJTask() {
1046 >        ForkJoinTask a = new CheckedFJTask() {
1047              public void realCompute() {
1048                  CCF f = new LCCF(null, 8);
1049                  FailingCCF g = new LFCCF(null, 9);
# Line 1062 | Line 1062 | public class CountedCompleterTest extend
1062       * invokeAll(collection)  throws exception if any task does
1063       */
1064      public void testAbnormalInvokeAllCollection() {
1065 <       ForkJoinTask a = new CheckedFJTask() {
1065 >        ForkJoinTask a = new CheckedFJTask() {
1066              public void realCompute() {
1067                  FailingCCF f = new LFCCF(null, 8);
1068                  CCF g = new LCCF(null, 9);
# Line 1086 | Line 1086 | public class CountedCompleterTest extend
1086       * and suppresses execution
1087       */
1088      public void testTryUnfork() {
1089 <       ForkJoinTask a = new CheckedFJTask() {
1089 >        ForkJoinTask a = new CheckedFJTask() {
1090              public void realCompute() {
1091                  CCF g = new LCCF(null, 9);
1092                  assertSame(g, g.fork());
# Line 1105 | Line 1105 | public class CountedCompleterTest extend
1105       * there are more tasks than threads
1106       */
1107      public void testGetSurplusQueuedTaskCount() {
1108 <       ForkJoinTask a = new CheckedFJTask() {
1108 >        ForkJoinTask a = new CheckedFJTask() {
1109              public void realCompute() {
1110                  CCF h = new LCCF(null, 7);
1111                  assertSame(h, h.fork());
# Line 1127 | Line 1127 | public class CountedCompleterTest extend
1127       * peekNextLocalTask returns most recent unexecuted task.
1128       */
1129      public void testPeekNextLocalTask() {
1130 <       ForkJoinTask a = new CheckedFJTask() {
1130 >        ForkJoinTask a = new CheckedFJTask() {
1131              public void realCompute() {
1132                  CCF g = new LCCF(null, 9);
1133                  assertSame(g, g.fork());
# Line 1147 | Line 1147 | public class CountedCompleterTest extend
1147       * executing it
1148       */
1149      public void testPollNextLocalTask() {
1150 <       ForkJoinTask a = new CheckedFJTask() {
1150 >        ForkJoinTask a = new CheckedFJTask() {
1151              public void realCompute() {
1152                  CCF g = new LCCF(null, 9);
1153                  assertSame(g, g.fork());
# Line 1166 | Line 1166 | public class CountedCompleterTest extend
1166       * pollTask returns an unexecuted task without executing it
1167       */
1168      public void testPollTask() {
1169 <       ForkJoinTask a = new CheckedFJTask() {
1169 >        ForkJoinTask a = new CheckedFJTask() {
1170              public void realCompute() {
1171                  CCF g = new LCCF(null, 9);
1172                  assertSame(g, g.fork());
# Line 1184 | Line 1184 | public class CountedCompleterTest extend
1184       * peekNextLocalTask returns least recent unexecuted task in async mode
1185       */
1186      public void testPeekNextLocalTaskAsync() {
1187 <       ForkJoinTask a = new CheckedFJTask() {
1187 >        ForkJoinTask a = new CheckedFJTask() {
1188              public void realCompute() {
1189                  CCF g = new LCCF(null, 9);
1190                  assertSame(g, g.fork());
# Line 1205 | Line 1205 | public class CountedCompleterTest extend
1205       * executing it, in async mode
1206       */
1207      public void testPollNextLocalTaskAsync() {
1208 <       ForkJoinTask a = new CheckedFJTask() {
1208 >        ForkJoinTask a = new CheckedFJTask() {
1209              public void realCompute() {
1210                  CCF g = new LCCF(null, 9);
1211                  assertSame(g, g.fork());
# Line 1225 | Line 1225 | public class CountedCompleterTest extend
1225       * async mode
1226       */
1227      public void testPollTaskAsync() {
1228 <       ForkJoinTask a = new CheckedFJTask() {
1228 >        ForkJoinTask a = new CheckedFJTask() {
1229              public void realCompute() {
1230                  CCF g = new LCCF(null, 9);
1231                  assertSame(g, g.fork());
# Line 1248 | Line 1248 | public class CountedCompleterTest extend
1248       * completed tasks; getRawResult returns null.
1249       */
1250      public void testInvokeSingleton() {
1251 <       ForkJoinTask a = new CheckedFJTask() {
1251 >        ForkJoinTask a = new CheckedFJTask() {
1252              public void realCompute() {
1253                  CCF f = new LCCF(null, 8);
1254                  assertNull(f.invoke());
# Line 1264 | Line 1264 | public class CountedCompleterTest extend
1264       * completed tasks
1265       */
1266      public void testQuietlyInvokeSingleton() {
1267 <       ForkJoinTask a = new CheckedFJTask() {
1267 >        ForkJoinTask a = new CheckedFJTask() {
1268              public void realCompute() {
1269                  CCF f = new LCCF(null, 8);
1270                  f.quietlyInvoke();
# Line 1278 | Line 1278 | public class CountedCompleterTest extend
1278       * join of a forked task returns when task completes
1279       */
1280      public void testForkJoinSingleton() {
1281 <       ForkJoinTask a = new CheckedFJTask() {
1281 >        ForkJoinTask a = new CheckedFJTask() {
1282              public void realCompute() {
1283                  CCF f = new LCCF(null, 8);
1284                  assertSame(f, f.fork());
# Line 1293 | Line 1293 | public class CountedCompleterTest extend
1293       * get of a forked task returns when task completes
1294       */
1295      public void testForkGetSingleton() {
1296 <       ForkJoinTask a = new CheckedFJTask() {
1296 >        ForkJoinTask a = new CheckedFJTask() {
1297              public void realCompute() throws Exception {
1298                  CCF f = new LCCF(null, 8);
1299                  assertSame(f, f.fork());
# Line 1308 | Line 1308 | public class CountedCompleterTest extend
1308       * timed get of a forked task returns when task completes
1309       */
1310      public void testForkTimedGetSingleton() {
1311 <       ForkJoinTask a = new CheckedFJTask() {
1311 >        ForkJoinTask a = new CheckedFJTask() {
1312              public void realCompute() throws Exception {
1313                  CCF f = new LCCF(null, 8);
1314                  assertSame(f, f.fork());
# Line 1323 | Line 1323 | public class CountedCompleterTest extend
1323       * timed get with null time unit throws NPE
1324       */
1325      public void testForkTimedGetNPESingleton() {
1326 <       ForkJoinTask a = new CheckedFJTask() {
1326 >        ForkJoinTask a = new CheckedFJTask() {
1327              public void realCompute() throws Exception {
1328                  CCF f = new LCCF(null, 8);
1329                  assertSame(f, f.fork());
# Line 1339 | Line 1339 | public class CountedCompleterTest extend
1339       * quietlyJoin of a forked task returns when task completes
1340       */
1341      public void testForkQuietlyJoinSingleton() {
1342 <       ForkJoinTask a = new CheckedFJTask() {
1342 >        ForkJoinTask a = new CheckedFJTask() {
1343              public void realCompute() {
1344                  CCF f = new LCCF(null, 8);
1345                  assertSame(f, f.fork());
# Line 1355 | Line 1355 | public class CountedCompleterTest extend
1355       * getQueuedTaskCount returns 0 when quiescent
1356       */
1357      public void testForkHelpQuiesceSingleton() {
1358 <       ForkJoinTask a = new CheckedFJTask() {
1358 >        ForkJoinTask a = new CheckedFJTask() {
1359              public void realCompute() {
1360                  CCF f = new LCCF(null, 8);
1361                  assertSame(f, f.fork());
# Line 1371 | Line 1371 | public class CountedCompleterTest extend
1371       * invoke task throws exception when task completes abnormally
1372       */
1373      public void testAbnormalInvokeSingleton() {
1374 <       ForkJoinTask a = new CheckedFJTask() {
1374 >        ForkJoinTask a = new CheckedFJTask() {
1375              public void realCompute() {
1376                  FailingCCF f = new LFCCF(null, 8);
1377                  try {
# Line 1388 | Line 1388 | public class CountedCompleterTest extend
1388       * quietlyInvoke task returns when task completes abnormally
1389       */
1390      public void testAbnormalQuietlyInvokeSingleton() {
1391 <       ForkJoinTask a = new CheckedFJTask() {
1391 >        ForkJoinTask a = new CheckedFJTask() {
1392              public void realCompute() {
1393                  FailingCCF f = new LFCCF(null, 8);
1394                  f.quietlyInvoke();
# Line 1402 | Line 1402 | public class CountedCompleterTest extend
1402       * join of a forked task throws exception when task completes abnormally
1403       */
1404      public void testAbnormalForkJoinSingleton() {
1405 <       ForkJoinTask a = new CheckedFJTask() {
1405 >        ForkJoinTask a = new CheckedFJTask() {
1406              public void realCompute() {
1407                  FailingCCF f = new LFCCF(null, 8);
1408                  assertSame(f, f.fork());
# Line 1420 | Line 1420 | public class CountedCompleterTest extend
1420       * get of a forked task throws exception when task completes abnormally
1421       */
1422      public void testAbnormalForkGetSingleton() {
1423 <       ForkJoinTask a = new CheckedFJTask() {
1423 >        ForkJoinTask a = new CheckedFJTask() {
1424              public void realCompute() throws Exception {
1425                  FailingCCF f = new LFCCF(null, 8);
1426                  assertSame(f, f.fork());
# Line 1440 | Line 1440 | public class CountedCompleterTest extend
1440       * timed get of a forked task throws exception when task completes abnormally
1441       */
1442      public void testAbnormalForkTimedGetSingleton() {
1443 <       ForkJoinTask a = new CheckedFJTask() {
1443 >        ForkJoinTask a = new CheckedFJTask() {
1444              public void realCompute() throws Exception {
1445                  FailingCCF f = new LFCCF(null, 8);
1446                  assertSame(f, f.fork());
# Line 1460 | Line 1460 | public class CountedCompleterTest extend
1460       * quietlyJoin of a forked task returns when task completes abnormally
1461       */
1462      public void testAbnormalForkQuietlyJoinSingleton() {
1463 <       ForkJoinTask a = new CheckedFJTask() {
1463 >        ForkJoinTask a = new CheckedFJTask() {
1464              public void realCompute() {
1465                  FailingCCF f = new LFCCF(null, 8);
1466                  assertSame(f, f.fork());
# Line 1475 | Line 1475 | public class CountedCompleterTest extend
1475       * invoke task throws exception when task cancelled
1476       */
1477      public void testCancelledInvokeSingleton() {
1478 <       ForkJoinTask a = new CheckedFJTask() {
1478 >        ForkJoinTask a = new CheckedFJTask() {
1479              public void realCompute() {
1480                  CCF f = new LCCF(null, 8);
1481                  assertTrue(f.cancel(true));
# Line 1493 | Line 1493 | public class CountedCompleterTest extend
1493       * join of a forked task throws exception when task cancelled
1494       */
1495      public void testCancelledForkJoinSingleton() {
1496 <       ForkJoinTask a = new CheckedFJTask() {
1496 >        ForkJoinTask a = new CheckedFJTask() {
1497              public void realCompute() {
1498                  CCF f = new LCCF(null, 8);
1499                  assertTrue(f.cancel(true));
# Line 1512 | Line 1512 | public class CountedCompleterTest extend
1512       * get of a forked task throws exception when task cancelled
1513       */
1514      public void testCancelledForkGetSingleton() {
1515 <       ForkJoinTask a = new CheckedFJTask() {
1515 >        ForkJoinTask a = new CheckedFJTask() {
1516              public void realCompute() throws Exception {
1517                  CCF f = new LCCF(null, 8);
1518                  assertTrue(f.cancel(true));
# Line 1531 | Line 1531 | public class CountedCompleterTest extend
1531       * timed get of a forked task throws exception when task cancelled
1532       */
1533      public void testCancelledForkTimedGetSingleton() throws Exception {
1534 <       ForkJoinTask a = new CheckedFJTask() {
1534 >        ForkJoinTask a = new CheckedFJTask() {
1535              public void realCompute() throws Exception {
1536                  CCF f = new LCCF(null, 8);
1537                  assertTrue(f.cancel(true));
# Line 1550 | Line 1550 | public class CountedCompleterTest extend
1550       * quietlyJoin of a forked task returns when task cancelled
1551       */
1552      public void testCancelledForkQuietlyJoinSingleton() {
1553 <       ForkJoinTask a = new CheckedFJTask() {
1553 >        ForkJoinTask a = new CheckedFJTask() {
1554              public void realCompute() {
1555                  CCF f = new LCCF(null, 8);
1556                  assertTrue(f.cancel(true));
# Line 1565 | Line 1565 | public class CountedCompleterTest extend
1565       * invoke task throws exception after invoking completeExceptionally
1566       */
1567      public void testCompleteExceptionallySingleton() {
1568 <       ForkJoinTask a = new CheckedFJTask() {
1568 >        ForkJoinTask a = new CheckedFJTask() {
1569              public void realCompute() {
1570                  CCF f = new LCCF(null, 8);
1571                  f.completeExceptionally(new FJException());
# Line 1583 | Line 1583 | public class CountedCompleterTest extend
1583       * invokeAll(t1, t2) invokes all task arguments
1584       */
1585      public void testInvokeAll2Singleton() {
1586 <       ForkJoinTask a = new CheckedFJTask() {
1586 >        ForkJoinTask a = new CheckedFJTask() {
1587              public void realCompute() {
1588                  CCF f = new LCCF(null, 8);
1589                  CCF g = new LCCF(null, 9);
# Line 1600 | Line 1600 | public class CountedCompleterTest extend
1600       * invokeAll(tasks) with 1 argument invokes task
1601       */
1602      public void testInvokeAll1Singleton() {
1603 <       ForkJoinTask a = new CheckedFJTask() {
1603 >        ForkJoinTask a = new CheckedFJTask() {
1604              public void realCompute() {
1605                  CCF f = new LCCF(null, 8);
1606                  invokeAll(f);
# Line 1614 | Line 1614 | public class CountedCompleterTest extend
1614       * invokeAll(tasks) with > 2 argument invokes tasks
1615       */
1616      public void testInvokeAll3Singleton() {
1617 <       ForkJoinTask a = new CheckedFJTask() {
1617 >        ForkJoinTask a = new CheckedFJTask() {
1618              public void realCompute() {
1619                  CCF f = new LCCF(null, 8);
1620                  CCF g = new LCCF(null, 9);
# Line 1634 | Line 1634 | public class CountedCompleterTest extend
1634       * invokeAll(collection) invokes all tasks in the collection
1635       */
1636      public void testInvokeAllCollectionSingleton() {
1637 <       ForkJoinTask a = new CheckedFJTask() {
1637 >        ForkJoinTask a = new CheckedFJTask() {
1638              public void realCompute() {
1639                  CCF f = new LCCF(null, 8);
1640                  CCF g = new LCCF(null, 9);
# Line 1658 | Line 1658 | public class CountedCompleterTest extend
1658       * invokeAll(tasks) with any null task throws NPE
1659       */
1660      public void testInvokeAllNPESingleton() {
1661 <       ForkJoinTask a = new CheckedFJTask() {
1661 >        ForkJoinTask a = new CheckedFJTask() {
1662              public void realCompute() {
1663                  CCF f = new LCCF(null, 8);
1664                  CCF g = new LCCF(null, 9);
# Line 1675 | Line 1675 | public class CountedCompleterTest extend
1675       * invokeAll(t1, t2) throw exception if any task does
1676       */
1677      public void testAbnormalInvokeAll2Singleton() {
1678 <       ForkJoinTask a = new CheckedFJTask() {
1678 >        ForkJoinTask a = new CheckedFJTask() {
1679              public void realCompute() {
1680                  CCF f = new LCCF(null, 8);
1681                  FailingCCF g = new LFCCF(null, 9);
# Line 1693 | Line 1693 | public class CountedCompleterTest extend
1693       * invokeAll(tasks) with 1 argument throws exception if task does
1694       */
1695      public void testAbnormalInvokeAll1Singleton() {
1696 <       ForkJoinTask a = new CheckedFJTask() {
1696 >        ForkJoinTask a = new CheckedFJTask() {
1697              public void realCompute() {
1698                  FailingCCF g = new LFCCF(null, 9);
1699                  try {
# Line 1710 | Line 1710 | public class CountedCompleterTest extend
1710       * invokeAll(tasks) with > 2 argument throws exception if any task does
1711       */
1712      public void testAbnormalInvokeAll3Singleton() {
1713 <       ForkJoinTask a = new CheckedFJTask() {
1713 >        ForkJoinTask a = new CheckedFJTask() {
1714              public void realCompute() {
1715                  CCF f = new LCCF(null, 8);
1716                  FailingCCF g = new LFCCF(null, 9);
# Line 1729 | Line 1729 | public class CountedCompleterTest extend
1729       * invokeAll(collection)  throws exception if any task does
1730       */
1731      public void testAbnormalInvokeAllCollectionSingleton() {
1732 <       ForkJoinTask a = new CheckedFJTask() {
1732 >        ForkJoinTask a = new CheckedFJTask() {
1733              public void realCompute() {
1734                  FailingCCF f = new LFCCF(null, 8);
1735                  CCF g = new LCCF(null, 9);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines