]> granicus.if.org Git - icu/commitdiff
ICU-21900 Fix ICU4C sample dtitvfmtsample segfault and update healthy code doc
authorCraig Cornelius <cwcornelius@gmail.com>
Fri, 25 Feb 2022 21:45:16 +0000 (13:45 -0800)
committerCraig Cornelius <cwcornelius@gmail.com>
Fri, 25 Feb 2022 23:28:03 +0000 (15:28 -0800)
docs/processes/release/tasks/healthy-code.md
icu4c/source/samples/dtitvfmtsample/dtitvfmtsample.cpp

index 68fcfd446b840aaa98b942d2f548ea5528750dc1..a3eb657e07d4db1ed49e91501297cccffc8cc873 100644 (file)
@@ -469,6 +469,7 @@ make check
 
 ## Test ICU4C Samples and Demos
 
+### Windows build and test
 To build the ICU4C samples on Windows with Visual Studio, use the following
 steps:
 
@@ -489,6 +490,28 @@ steps:
 To test the sample programs, run the "source\\samples\\all\\samplecheck.bat"
 script for each configuration, and ensure that they are successful.
 
+### Linux /Unix build and test
+To build and test ICU4C samples:
+
+* In icu4c/source, run the configuration "./runConfigure Linux" (or appropriate system)
+* Build and install ICU4C.
+* Set PATH to include the bin directory of the installed ICU4c.
+* Set LD_LIBRARY_PATH to include the libs directory on the installed ICU4c.
+
+
+```
+cd icu4c/source
+cd samples
+# To clean all the test binaries
+make clean-samples-recursive
+# To rebuild them all
+make all-samples-recursive
+# To run all tests serially
+make check-samples-recursive
+
+```
+
+
 ## **Test ICU4C Demos via Docker**
 
 See <https://github.com/unicode-org/icu-demos/blob/main/icu-kube/README.md>
index 1f160dcf36794f003866d7c9489181e8a94aee0d..3644fe01687510eeb43ce4fc89c622ecb3e2c1d8 100644 (file)
@@ -51,7 +51,7 @@ static void dtitvfmtPreDefined() {
             UnicodeString("yMMMd"),
             UnicodeString("MMMMd"),
             UnicodeString("jm"),
-            0,
+            UnicodeString("")
         };
     u_fprintf(out,"%-10s%-22s%-22s%-35s%-35s\n", "Skeleton","from","to","Date Interval in en_US","Date Interval in Ja");
     int i=0;
@@ -107,7 +107,7 @@ static void dtitvfmtCustomized() {
     UnicodeString skeletons[] = {
             UnicodeString("yMMMd"),
             UnicodeString("Hm"),
-            0,
+            UnicodeString("")
         };
         u_printf("%-10s%-22s%-22s%-45s%-35s\n", "Skeleton", "from","to", "Date Interval in en_US","Date Interval in Ja");
         // Create an empty DateIntervalInfo object