]> granicus.if.org Git - icu/commitdiff
ICU-22220 Update ICU4J samples instructions sven-oly-ICU4J-sample-info 2360/head
authorCraig Cornelius <ccornelius@google.com>
Thu, 9 Mar 2023 00:19:48 +0000 (16:19 -0800)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2023 00:19:48 +0000 (16:19 -0800)
Add more explicit information about testing the ICU4J sample programs. This now includes command line instructions as well as more details on running them via Eclipse IDE.

docs/processes/release/tasks/healthy-code.md

index ce79ad17becb56c9e521652a2b01fd46ce3bf484..419ad9ef9d86598dd49f33b0cf090ee3290e01b8 100644 (file)
@@ -549,9 +549,36 @@ which it is executed instead of in a ssh shell.
 The demos include calendar, charset detection, holidays, RBNF and
 transliterator. Check if each application is working OK.
 
-To check ICU4J samples, open Eclipse workspace and import icu4j-samples project
-from directory <icu4j_root>/samples. Make sure these sample code has no build
-issues. Also run sample code with main and see if each sample code runs.
+### ICU4J Samples
+
+ICU4J samples are located in directory <icu4j_root>/samples. Check that:
+
+* The build succeeds.
+* Each sample runs, giving results appropriate for the sample.
+    
+To check ICU4J samples, you may use the command line to build and then run each:
+```sh
+    $ cd icu4j/samples
+    $ ant build
+    
+    # Get the list of main samples to test.
+    $ grep -r main src/
+      src/com/ibm/icu/samples/text/dateintervalformat/DateIntervalFormatSample.java
+      ...
+    
+    # For each sample, execute as follows:
+    $ java -cp ../icu4j.jar:out/lib/icu4j-samples.jar com.ibm.icu.samples.text.dateintervalformat.DateIntervalFormatSample
+```
+    
+To use Eclipse, do the following:
+    
+* Open Eclipse workspace
+* import icu4j-samples project
+* Build the project
+* In package explorer, right-click on "Run as"
+    * Pick "Java application"
+    * Choose a sample
+    * Verify that the sample runs and that output appears in the console windo.
 
 ---