FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

This revision is an attempt to eliminate all references to conc*.jar · DrJavaAtRice/drjava@a8ce48b · GitHub

Repository navigation

Commit a8ce48b

Browse files
committed
This revision is an attempt to eliminate all references to conc*.jar
files in the building and testing of DrJava. The ConcJUnit framework is no longer supported. We need to confirm that DrJavaTestCase classes manage to detect failures in thread outside of the main testing thread. The following files were either modified, added or deleted in the code base: modified: build.xml deleted: lib/buildlib/concjunitrt.jar deleted: lib/buildlib/concutest-junit-4.7-withrt-nodep.jar renamed: lib/buildlib/hamcrest-core-1.3.jar -> lib/buildlib/hamcrest-core.jar deleted: lib/concutest-junit-4.7-withrt-nodep.jar new file: lib/hamcrest-core.jar new file: lib/junit.jar modified: src/edu/rice/cs/drjava/model/ConcreteRegionManager.java modified: src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java modified: src/edu/rice/cs/drjava/ui/MainFrame.java
1 parent 524c840 commit a8ce48b

10 files changed

Lines changed: 7 additions & 74 deletions

‎drjava/build.xml‎

Lines changed: 3 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
<property name="readable-project-name" value="DrJava" />
1010
<property name="src-working-dir" value="src/edu/rice/cs/drjava" />
11-
<property name="junit-jar-to-include" value="lib/concutest-junit-4.7-withrt-nodep.jar" />
1211
<property name="md5-temp-name" value="classes/md5.properties" />
1312
<property name="md5-properties-path" value="edu/rice/cs/drjava/md5.properties" />
1413
<property name="main-class" value="edu.rice.cs.drjava.DrJava" />
@@ -62,15 +61,12 @@
6261
<property name="coverage-report-dir" value="coverage_report"/>
6362
<property name="coverage-exec" value="jacoco.exec"/>
6463

65-
<!-- <extendclasspath path="lib/buildlib/junit.jar" /> -->
66-
6764
<fileset id="libs" dir="lib" includes="*.jar" /> <!-- Only include jars that are at the top level (not in buildlib) -->
6865
<fileset id="jrelibs" dir="${java.home}/lib" includes="*.jar" />
6966
<echo message="libs = ${toString:libs}" />
7067
<echo message="jrelibs = ${toString:jrelibs}" />
7168
<fileset id="extlibs" dir="${java.home}/lib/ext" includes="*.jar" />
7269
<echo message="extlibs = ${toString:extlibs}" />
73-
<property name="use-concjunit" value="false" />
7470
<!-- ************
7571
Help Targets
7672
************ -->
@@ -140,7 +136,6 @@
140136
<echo message=" popup)" />
141137
<echo message="drjava.test.config: Location of the DrJava configuration file to use" />
142138
<echo message=" in tests (default: testFiles/drjava.basic.config)" />
143-
<echo message="use-concjunit: Set to true to test ConcJUnit instead of JUnit." />
144139
</target>
145140

146141
<!-- ************
@@ -335,17 +330,14 @@
335330
<antcall target="iterate-tests">
336331
<param name="test-jvm" value="java" />
337332
<param name="test-tools" value="${current-tools}" />
338-
<param name="test-force-disable-concjunit" value="false" />
339333
</antcall>
340334
</target>
341335

342336
<target name="test-8" depends="compile, resolve-java8-exec, resolve-java8-tools" unless="skip-test"
343337
description="Run all tests under Java 8 (after compiling); use -Dtest-spec=... to filter">
344-
<echo message="ConcJUnit is currently incompatible with Java 8."/>
345338
<antcall target="iterate-tests">
346339
<param name="test-jvm" value="${java8-exec}" />
347340
<param name="test-tools" value="${java8-tools}" />
348-
<param name="test-force-disable-concjunit" value="true" />
349341
</antcall>
350342
</target>
351343

@@ -434,9 +426,8 @@
434426
</target>
435427

436428

437-
<target name="do-test" depends="resolve-jvm-args, resolve-junit-jar">
429+
<target name="do-test" depends="resolve-jvm-args">
438430
<echo message="Running all tests matching '${test-filter-string}' with command '${test-jvm}', using '${junit-jar}' and '${test-tools}'" />
439-
<!-- <extendclasspath path="${junit-jar}" /> -->
440431
<jacoco:coverage xmlns:jacoco="antlib:org.jacoco.ant">
441432
<junit haltonfailure="${test-halt}" failureproperty="test-failed"
442433
fork="yes" forkmode="perTest" maxmemory="2G" jvm="${test-jvm}" dir="${basedir}">
@@ -457,7 +448,7 @@
457448
<propertyref prefix="drjava." />
458449
<!-- Add any properties that should be passed on -->
459450
</syspropertyset>
460-
<jvmarg line="${jvm-args} ${concjunit-bootclasspath}" />
451+
<jvmarg line="${jvm-args}" />
461452
<formatter classname="${test-formatter-class}" usefile="${test-output-to-file}" />
462453
<batchtest fork="true">
463454
<fileset dir="classes/test">
@@ -665,7 +656,7 @@
665656
Clean Targets
666657
************* -->
667658

668-
<target name="clean" depends="clean-intermediate, clean-coverage-report, clean-products, clean-concjunit" description="Remove all build products; the result should match the intended Subversion contents">
659+
<target name="clean" depends="clean-intermediate, clean-coverage-report, clean-products" description="Remove all build products; the result should match the intended Subversion contents">
669660
</target>
670661

671662
<target name="clean-intermediate" unless="skip-clean">
@@ -721,13 +712,6 @@
721712

722713
</target>
723714

724-
<target name="clean-concjunit" unless="skip-clean">
725-
<echo message="Deleting ConcJUnit artifacts" />
726-
727-
<delete file="instr.concjunit.txt" failonerror="${clean-can-fail}" />
728-
<delete file="rt.concjunit.jar" failonerror="${clean-can-fail}" />
729-
</target>
730-
731715
<!-- ***************
732716
Release Targets
733717
*************** -->
@@ -1174,54 +1158,5 @@
11741158
-->
11751159
<available file="${generate-dir}" property="already-generated" />
11761160
</target>
1177-
1178-
1179-
1180-
<!-- *****************
1181-
ConcJUnit Targets
1182-
***************** -->
1183-
<target name="resolve-junit-jar">
1184-
<if>
1185-
<and>
1186-
<istrue value="${use-concjunit}" />
1187-
<isfalse value="${test-force-disable-concjunit}" />
1188-
</and>
1189-
<then>
1190-
<property name="junit-jar-1" location="lib/buildlib/concutest-junit-4.7-withrt-nodep.jar" />
1191-
<available property="junit-jar" value="${junit-jar-1}" file="${junit-jar-1}" />
1192-
1193-
<fail message="Can't find concutest-junit-4.7-withrt-nodep.jar in the lib/buildlib directory" unless="junit-jar" />
1194-
1195-
<property name="concjunitrt-jar-1" location="lib/buildlib/concjunitrt.jar" />
1196-
<available property="concjunitrt-jar" value="${concjunitrt-jar-1}" file="${concjunitrt-jar-1}" />
1197-
1198-
<fail message="Can't find concjunitrt.jar in the lib/buildlib directory" unless="concjunitrt-jar" />
1199-
1200-
<property name="rt-concjunit-jar-1" location="rt.concjunit.jar" />
1201-
1202-
<if>
1203-
<not>
1204-
<available file="${rt-concjunit-jar-1}" />
1205-
</not>
1206-
<then>
1207-
<echo message="Instrumenting Java runtime (no changes made to original), java=${test-jvm}" />
1208-
<java jar="${concjunitrt-jar}" jvm="${test-jvm}" fork="yes" inputstring="Y"/>
1209-
</then>
1210-
<else>
1211-
<echo message="${rt-concjunit-jar-1} already exists, not instrumenting." />
1212-
</else>
1213-
</if>
1214-
<available property="concjunit-bootclasspath" value="-Xbootclasspath/p:'${rt-concjunit-jar-1}'" file="${rt-concjunit-jar-1}" />
1215-
<echo message="boot classpath: ${concjunit-bootclasspath}" />
1216-
</then>
1217-
<else>
1218-
<property name="junit-jar-1" location="lib/buildlib/junit.jar" />
1219-
<available property="junit-jar" value="${junit-jar-1}" file="${junit-jar-1}" />
1220-
<available property="concjunit-bootclasspath" value="" file="${junit-jar-1}" />
1221-
<fail message="Can't find junit.jar in the lib/buildlib directory" unless="junit-jar" />
1222-
</else>
1223-
</if>
1224-
</target>
1225-
12261161
</project>
12271162

-597 KB
Binary file not shown.
-893 KB
Binary file not shown.
-893 KB
Binary file not shown.

‎drjava/lib/hamcrest-core.jar‎

44 KB
Binary file not shown.

‎drjava/lib/junit.jar‎

308 KB
Binary file not shown.

‎drjava/src/edu/rice/cs/drjava/model/ConcreteRegionManager.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ public void addRegion(final R region) {
321321
docRegions = new RegionSet<R>();
322322

323323
/* The RegionSet needs a reference to 'this' so 'this' is notified on changes. */
324-
if (this._notifyOnSetChange) {
325-
@SuppressWarnings("unchecked")
324+
if (this._notifyOnSetChange) {
325+
@SuppressWarnings("unchecked") // What an ugly hack; the elements in ConcreteRegionManager have type R
326326
ConcreteRegionManager<OrderedDocumentRegion> thisRef = (ConcreteRegionManager<OrderedDocumentRegion>)this;
327327
docRegions.setManager(thisRef);
328328
}

‎drjava/src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
public final class GlobalModelJUnitTest extends GlobalModelTestCase {
4747

48-
private static Log _log = new Log("GlobalModel.txt", false);
48+
private static Log _log = new Log("GlobalModel.txt", true);
4949

5050
/** Whether or not to print debugging output. */
5151
static final boolean printMessages = true;

‎drjava/src/edu/rice/cs/drjava/ui/MainFrame.java‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,9 +2822,7 @@ public void regionChanged(MovingDocumentRegion r) {
28222822
regionRemoved(r);
28232823

28242824
/* Only re-add region if it is still a match. */
2825-
if (findReplacePanel.isSearchStringMatch(r, searchString)) {
2826-
regionAdded(r);
2827-
}
2825+
if (findReplacePanel.isSearchStringMatch(r, searchString)) { regionAdded(r); }
28282826
}
28292827

28302828
public void regionRemoved(MovingDocumentRegion r) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL