| /third_party/musl/libc-test/src/functionalext/unittest/ |
| D | unit_test_hilog_vsnprint_f_p.c | 7 * http://www.apache.org/licenses/LICENSE-2.0 16 #include "test.h" 26 static int vsprintf_test(char *strDest, size_t destMax, size_t count, int priv, const char *fmt, ..… in vsprintf_test() argument 30 va_start(ap, fmt); in vsprintf_test() 31 ret = vsnprintfp_s(strDest, destMax, count, priv, fmt, ap); in vsprintf_test() 38 * @tc.desc : test vsnprintf normal condition 44 char *fmt = "MUSL"; in vsnprintfp_s_0010() local 45 int ret = vsprintf_test(buf, MAX_LOG_LEN, MAX_LOG_LEN - 1, true, fmt); in vsnprintfp_s_0010() 52 * @tc.desc : test vsnprintf both param buf and fmt are NULL 58 char *fmt = NULL; in vsnprintfp_s_0020() local [all …]
|
| /third_party/icu/icu4c/source/test/intltest/ |
| D | nmfmtrt.cpp | 5 * Copyright (c) 1997-2015, International Business Machines Corporation 33 double NumberFormatRoundTripTest::MAX_ERROR = 1e-14; 37 #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)"… argument 66 // Assume 8-bit (or larger) rand values. Also assume in randLong() 79 * Return a random value from -range..+range. 85 return (2.0 * range * a) - range; in randomDouble() 91 // test(NumberFormat.getInstance(new Locale("sr", "", ""))); in start() 95 NumberFormat *fmt = NULL; in start() local 99 fmt = NumberFormat::createInstance(status); in start() 101 test(fmt); in start() [all …]
|
| D | dtfmapts.cpp | 5 * Copyright (c) 1997-2011, International Business Machines Corporation 22 // This is an API test, not a unit test. It doesn't test very many cases, and doesn't 23 // try to test the full functionality. It just calls each function in the class and 30 case 0: name = "DateFormat API test"; in runIndexedTest() 32 logln("DateFormat API test---"); logln(""); in runIndexedTest() 37 … errln("ERROR: Could not set default locale, test may not give correct results"); in runIndexedTest() 46 logln("TestEquals---"); logln(""); in runIndexedTest() 53 logln("TestNameHiding---"); logln(""); in runIndexedTest() 60 logln("TestCoverage---"); logln(""); in runIndexedTest() 92 * Test that the equals method works correctly. [all …]
|
| D | numfmtst.h | 5 * Copyright (c) 1997-2016, International Business Machines Corporation 24 * {0, -1, 0} (The sentinel element indicating end of iterator). Then test 36 * Header for the data-driven test, powered by numberformattestspecification.txt 64 * Performs various in-depth test on NumberFormat 73 * Test APIs (to increase code coverage) 81 * Test the handling of quotes 85 * Test patterns with exponential representation 89 * Test handling of patterns with currency symbols 93 * Test different format patterns 104 * Test localized currency patterns. [all …]
|
| /third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/ |
| D | SimpleFormatterTest.java | 6 * Copyright (C) 2014-2016, International Business Machines Corporation and 10 package ohos.global.icu.dev.test.util; 12 import org.junit.Test; 16 import ohos.global.icu.dev.test.TestFmwk; 33 // public methods ----------------------------------------------- 35 @Test 37 SimpleFormatter fmt = SimpleFormatter.compile("This doesn''t have templates '{0}"); in TestWithNoArguments() local 41 fmt.getArgumentLimit()); in TestWithNoArguments() 45 fmt.format("unused")); in TestWithNoArguments() 49 fmt.format((CharSequence[])null)); in TestWithNoArguments() [all …]
|
| /third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/ |
| D | SimpleFormatterTest.java | 5 * Copyright (C) 2014-2016, International Business Machines Corporation and 9 package com.ibm.icu.dev.test.util; 11 import org.junit.Test; 15 import com.ibm.icu.dev.test.TestFmwk; 30 // public methods ----------------------------------------------- 32 @Test 34 SimpleFormatter fmt = SimpleFormatter.compile("This doesn''t have templates '{0}"); in TestWithNoArguments() local 38 fmt.getArgumentLimit()); in TestWithNoArguments() 42 fmt.format("unused")); in TestWithNoArguments() 46 fmt.format((CharSequence[])null)); in TestWithNoArguments() [all …]
|
| /third_party/skia/third_party/externals/dawn/src/dawn_node/tools/src/cmd/run-cts/ |
| D | main.go | 7 // http://www.apache.org/licenses/LICENSE-2.0 15 // run-cts is a tool used to run the WebGPU CTS using the Dawn module for NodeJS 24 "fmt" 41 "github.com/mattn/go-colorable" 42 "github.com/mattn/go-isatty" 51 fmt.Println(err) 57 fmt.Println(` 58 run-cts is a tool used to run the WebGPU CTS using the Dawn module for NodeJS 61 run-cts --dawn-node=<path to dawn.node> --cts=<path to WebGPU CTS> [test-query]`) 74 return fmt.Sprint(strings.Join(*f, "")) [all …]
|
| /third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/format/ |
| D | NumberFormatRoundTripTest.java | 6 * Copyright (C) 2001-2010, International Business Machines Corporation and * 13 * Source File: $ICU4CRoot/source/test/intltest/nmfmtrt.cpp 16 package ohos.global.icu.dev.test.format; 21 import org.junit.Test; 25 import ohos.global.icu.dev.test.TestFmwk; 31 * Performs round-trip tests for NumberFormat 37 public double MAX_ERROR = 1e-14; 46 @Test 49 NumberFormat fmt = null; in TestNumberFormatRoundTrip() local 54 fmt = NumberFormat.getInstance(); in TestNumberFormatRoundTrip() [all …]
|
| D | IntlTestDateFormatAPIC.java | 6 * Copyright (C) 2001-2010, International Business Machines Corporation and * 13 * Source File: $ICU4CRoot/source/test/intltest/dtfmapts.cpp 16 package ohos.global.icu.dev.test.format; 22 import org.junit.Test; 26 import ohos.global.icu.dev.test.TestFmwk; 34 * This is an API test, not a unit test. It doesn't test very many cases, and doesn't 35 * try to test the full functionality. It just calls each function in the class and 42 * Test hiding of parse() and format() APIs in the Format hierarchy. 43 * We test the entire hierarchy, even though this test is located in 44 * the DateFormat API test. [all …]
|
| D | BigNumberFormatTest.java | 6 * Copyright (C) 1996-2009, International Business Machines Corporation and * 10 package ohos.global.icu.dev.test.format; 15 import org.junit.Test; 19 import ohos.global.icu.dev.test.TestFmwk; 27 * @test 28 * General test of Big NumberFormat 34 static final int ILLEGAL = -1; 36 @Test 50 * Test the functioning of the secondary grouping value. 52 @Test [all …]
|
| D | NumberFormatTest.java | 6 * Copyright (C) 2001-2016, International Business Machines Corporation and 13 * Source File: $ICU4oot/source/test/intltest/numfmtst.cpp 16 package ohos.global.icu.dev.test.format; 40 import org.junit.Test; 44 import ohos.global.icu.dev.test.TestFmwk; 45 import ohos.global.icu.dev.test.TestUtil; 46 import ohos.global.icu.dev.test.format.IntlTestDecimalFormatAPIC.FieldContainer; 77 @Test 99 double[] values = {-0.003006, -0.003005, -0.003004, 0.003014, 0.003015, 0.003016}; in TestRoundingScientific10542() 102 {"-3.00E-3", "-3.00E-3", "-3.00E-3", "3.02E-3", "3.02E-3", "3.02E-3"}, in TestRoundingScientific10542() [all …]
|
| D | NumberRegressionTests.java | 6 * Copyright (C) 1996-2016, International Business Machines 16 * @test 1.49 01/05/21 27 package ohos.global.icu.dev.test.format; 43 import org.junit.Test; 47 import ohos.global.icu.dev.test.TestFmwk; 68 @Test 84 @Test 93 if (nf1.equals(nf2)) errln("Test for bug 4074620 failed"); in Test4074620() 94 else logln("Test for bug 4074620 passed."); in Test4074620() 102 @Test [all …]
|
| D | NumberFormatDataDrivenTest.java | 4 package ohos.global.icu.dev.test.format; 10 import org.junit.Test; 12 import ohos.global.icu.dev.test.TestUtil; 36 } else if (s.equals("-Inf")) { in toNumber() 66 } else if (expected.equals("-Inf")) { in compareParseResult() 69 return "Expected -Inf, but got: " + actual; in compareParseResult() 82 …w AssertionError("Could not convert to BigDecimal: " + actual.toString() + " - " + e.getMessage()); in compareParseResult() 93 …* Standard function for comparing expected and actual parse-currency results. Handles failure case… 94 … * Does not currently handle NaN or Infinity because there are no parse-currency cases with NaN or 119 * Main ICU4J DecimalFormat data-driven test. [all …]
|
| D | ScientificNumberFormatterTest.java | 10 package ohos.global.icu.dev.test.format; 12 import org.junit.Test; 16 import ohos.global.icu.dev.test.TestFmwk; 30 @Test 37 "1.23456×10<sup>-78</sup>", in TestBasic() 38 markup.format(1.23456e-78)); in TestBasic() 42 superscript.format(1.23456e-78)); in TestBasic() 46 @Test 48 ScientificNumberFormatter fmt = ScientificNumberFormatter.getMarkupInstance( in TestFarsi() local 53 fmt.format(1.23456e-78)); in TestFarsi() [all …]
|
| /third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
| D | NumberFormatRoundTripTest.java | 5 * Copyright (C) 2001-2010, International Business Machines Corporation and * 12 * Source File: $ICU4CRoot/source/test/intltest/nmfmtrt.cpp 15 package com.ibm.icu.dev.test.format; 20 import org.junit.Test; 24 import com.ibm.icu.dev.test.TestFmwk; 29 * Performs round-trip tests for NumberFormat 34 public double MAX_ERROR = 1e-14; 43 @Test 46 NumberFormat fmt = null; in TestNumberFormatRoundTrip() local 51 fmt = NumberFormat.getInstance(); in TestNumberFormatRoundTrip() [all …]
|
| D | IntlTestDateFormatAPIC.java | 5 * Copyright (C) 2001-2010, International Business Machines Corporation and * 12 * Source File: $ICU4CRoot/source/test/intltest/dtfmapts.cpp 15 package com.ibm.icu.dev.test.format; 21 import org.junit.Test; 25 import com.ibm.icu.dev.test.TestFmwk; 32 * This is an API test, not a unit test. It doesn't test very many cases, and doesn't 33 * try to test the full functionality. It just calls each function in the class and 39 * Test hiding of parse() and format() APIs in the Format hierarchy. 40 * We test the entire hierarchy, even though this test is located in 41 * the DateFormat API test. [all …]
|
| D | BigNumberFormatTest.java | 5 * Copyright (C) 1996-2009, International Business Machines Corporation and * 9 package com.ibm.icu.dev.test.format; 14 import org.junit.Test; 18 import com.ibm.icu.dev.test.TestFmwk; 25 * @test 26 * General test of Big NumberFormat 31 static final int ILLEGAL = -1; 33 @Test 47 * Test the functioning of the secondary grouping value. 49 @Test [all …]
|
| D | NumberFormatTest.java | 5 * Copyright (C) 2001-2016, International Business Machines Corporation and 12 * Source File: $ICU4oot/source/test/intltest/numfmtst.cpp 15 package com.ibm.icu.dev.test.format; 39 import org.junit.Test; 43 import com.ibm.icu.dev.test.TestFmwk; 44 import com.ibm.icu.dev.test.TestUtil; 45 import com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC.FieldContainer; 74 @Test 96 double[] values = {-0.003006, -0.003005, -0.003004, 0.003014, 0.003015, 0.003016}; in TestRoundingScientific10542() 99 {"-3.00E-3", "-3.00E-3", "-3.00E-3", "3.02E-3", "3.02E-3", "3.02E-3"}, in TestRoundingScientific10542() [all …]
|
| D | NumberRegressionTests.java | 5 * Copyright (C) 1996-2016, International Business Machines 15 * @test 1.49 01/05/21 26 package com.ibm.icu.dev.test.format; 42 import org.junit.Test; 46 import com.ibm.icu.dev.test.TestFmwk; 65 @Test 81 @Test 90 if (nf1.equals(nf2)) errln("Test for bug 4074620 failed"); in Test4074620() 91 else logln("Test for bug 4074620 passed."); in Test4074620() 99 @Test [all …]
|
| D | ScientificNumberFormatterTest.java | 9 package com.ibm.icu.dev.test.format; 11 import org.junit.Test; 15 import com.ibm.icu.dev.test.TestFmwk; 27 @Test 34 "1.23456×10<sup>-78</sup>", in TestBasic() 35 markup.format(1.23456e-78)); in TestBasic() 39 superscript.format(1.23456e-78)); in TestBasic() 43 @Test 45 ScientificNumberFormatter fmt = ScientificNumberFormatter.getMarkupInstance( in TestFarsi() local 50 fmt.format(1.23456e-78)); in TestFarsi() [all …]
|
| D | NumberFormatDataDrivenTest.java | 3 package com.ibm.icu.dev.test.format; 9 import org.junit.Test; 11 import com.ibm.icu.dev.test.TestUtil; 33 } else if (s.equals("-Inf")) { in toNumber() 63 } else if (expected.equals("-Inf")) { in compareParseResult() 66 return "Expected -Inf, but got: " + actual; in compareParseResult() 79 …w AssertionError("Could not convert to BigDecimal: " + actual.toString() + " - " + e.getMessage()); in compareParseResult() 90 …* Standard function for comparing expected and actual parse-currency results. Handles failure case… 91 … * Does not currently handle NaN or Infinity because there are no parse-currency cases with NaN or 116 * Main ICU4J DecimalFormat data-driven test. [all …]
|
| /third_party/skia/third_party/externals/tint/tools/src/cmd/test-runner/ |
| D | main.go | 7 // http://www.apache.org/licenses/LICENSE-2.0 15 // test-runner runs tint against a number of test shaders checking for expected behavior 21 "fmt" 36 "github.com/sergi/go-diff/diffmatchpatch" 53 fmt.Println(err) 59 fmt.Println(` 60 test-runner runs tint against a number of test shaders checking for expected behavior 63 test-runner [flags...] <executable> [<directory>] 66 <directory> the root directory of the test files 70 fmt.Println(``) [all …]
|
| /third_party/skia/third_party/externals/tint/tools/src/cmd/fix-tests/ |
| D | main.go | 7 // http://www.apache.org/licenses/LICENSE-2.0 15 // fix-tests is a tool to update tests with new expected output. 21 "fmt" 34 fmt.Println(err) 40 fmt.Println(` 41 fix-tests is a tool to update tests with new expected output. 43 fix-tests performs string matching and heuristics to fix up expected results of 50 fix-tests <executable> 52 executable - the path to the test executable to run.`) 63 exe := args[0] // The path to the test executable [all …]
|
| /third_party/skia/third_party/externals/tint/src/diagnostic/ |
| D | formatter_test.cc | 7 // http://www.apache.org/licenses/LICENSE-2.0 24 constexpr const char* content = // Note: words are tab-delimited 31 class DiagFormatterTest : public testing::Test { 36 "purr", System::Test}; 39 System::Test}; 42 System::Test, "abc123"}; 45 "unreachable", System::Test}; 48 "nothing", System::Test}; 52 Formatter fmt{{false, false, false, false}}; in TEST_F() local 53 auto got = fmt.format(List{diag_note, diag_warn, diag_err}); in TEST_F() [all …]
|
| /third_party/libsnd/src/ |
| D | test_log_printf.c | 2 ** Copyright (C) 2003-2012 Erik de Castro Lopo <erikd@mega-nerd.com> 16 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 31 #define CMP_0_ARGS(line, err, fmt) \ argument 32 { psf->parselog.indx = 0 ; \ 33 snprintf (buffer, sizeof (buffer), (fmt)) ; \ 34 psf_log_printf (psf, (fmt)) ; \ 35 err += compare_strings_or_die (line, fmt, buffer, psf->parselog.buf) ; \ 38 #define CMP_2_ARGS(line, err, fmt, a) \ argument 39 { psf->parselog.indx = 0 ; \ 40 snprintf (buffer, sizeof (buffer), (fmt), (a), (a)) ; \ [all …]
|