Home
last modified time | relevance | path

Searched +full:test +full:- +full:fmt (Results 1 – 25 of 1058) sorted by relevance

12345678910>>...43

/external/icu/icu4c/source/test/intltest/
Dnmfmtrt.cpp5 * 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 …]
Ddtfmapts.cpp5 * 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 …]
Dnumfmtst.h5 * 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 …]
/external/fmtlib/test/
Dcore-test.cc1 // Formatting library for C++ - core tests
3 // Copyright (c) 2012 - present, Victor Zverovich
19 #include "test-assert.h"
21 // Check if fmt/core.h compiles with windows.h included before it.
26 #include "fmt/core.h"
31 using fmt::basic_format_arg;
32 using fmt::string_view;
33 using fmt::detail::buffer;
34 using fmt::detail::make_arg;
35 using fmt::detail::value;
[all …]
Dos-test.cc1 // Formatting library for C++ - tests of the OS-specific functionality
3 // Copyright (c) 2012 - present, Victor Zverovich
8 #include "fmt/os.h"
14 #include "gtest-extra.h"
21 using fmt::buffered_file;
22 using fmt::error_code;
28 TEST(UtilTest, UTF16ToUTF8) { in TEST() function
30 fmt::detail::utf16_to_utf8 u(L"\x0451\x0436\x0438\x043A"); in TEST()
35 TEST(UtilTest, UTF16ToUTF8EmptyString) { in TEST() function
37 fmt::detail::utf16_to_utf8 u(L""); in TEST()
[all …]
Dostream-test.cc1 // Formatting library for C++ - std::ostream support tests
3 // Copyright (c) 2012 - present, Victor Zverovich
8 #include "fmt/format.h"
10 struct test {}; struct
12 // Test that there is no issues with specializations when fmt/ostream.h is
13 // included after fmt/format.h.
14 namespace fmt { namespace
15 template <> struct formatter<test> : formatter<int> {
17 typename FormatContext::iterator format(const test&, FormatContext& ctx) { in format()
21 } // namespace fmt
[all …]
Dprintf-test.cc1 // Formatting library for C++ - printf tests
3 // Copyright (c) 2012 - present, Victor Zverovich
8 #include "fmt/printf.h"
14 #include "fmt/core.h"
15 #include "gtest-extra.h"
18 using fmt::format;
19 using fmt::format_error;
20 using fmt::detail::max_value;
25 static std::string make_positional(fmt::string_view format) { in make_positional()
31 static std::wstring make_positional(fmt::wstring_view format) { in make_positional()
[all …]
Dformat-impl-test.cc1 // Formatting library for C++ - formatting library implementation tests
3 // Copyright (c) 2012 - present, Victor Zverovich
10 #include "test-assert.h"
12 // Include format.cc instead of format.h to test implementation.
17 #include "fmt/printf.h"
19 #include "gtest-extra.h"
27 using fmt::detail::bigint;
28 using fmt::detail::fp;
29 using fmt::detail::max_value;
34 TEST(BigIntTest, Construct) { in TEST() function
[all …]
Dcompile-test.cc1 // Formatting library for C++ - formatting library tests
3 // Copyright (c) 2012 - present, Victor Zverovich
11 // Check that fmt/compile.h compiles with windows.h included before it.
16 #include "fmt/compile.h"
18 #include "gtest-extra.h"
26 typedef fmt::detail::compiled_format_base<decltype(format)> provider; in check_prepared_parts_type()
27 typedef fmt::detail::format_part<char> in check_prepared_parts_type()
31 "CompileTimePreparedPartsTypeProvider test failed"); in check_prepared_parts_type()
34 TEST(CompileTest, CompileTimePreparedPartsTypeProvider) { in TEST() function
52 TEST(CompileTest, PassStringLiteralFormat) { in TEST() function
[all …]
Dformat-test.cc1 // Formatting library for C++ - formatting library tests
3 // Copyright (c) 2012 - present, Victor Zverovich
19 // Check if fmt/format.h compiles with windows.h included before it.
24 // Check if fmt/format.h compiles with the X11 index macro defined.
27 #include "fmt/format.h"
32 #include "gtest-extra.h"
33 #include "mock-allocator.h"
38 using fmt::basic_memory_buffer;
39 using fmt::format;
40 using fmt::format_error;
[all …]
Dchrono-test.cc1 // Formatting library for C++ - time formatting tests
3 // Copyright (c) 2012 - present, Victor Zverovich
12 #include "fmt/chrono.h"
16 #include "gtest-extra.h"
51 TEST(TimeTest, Format) { in TEST() function
56 EXPECT_EQ("The date is 2016-04-25.", in TEST()
57 fmt::format("The date is {:%Y-%m-%d}.", tm)); in TEST()
60 TEST(TimeTest, GrowBuffer) { in TEST() function
65 fmt::format(s, *std::localtime(&t)); in TEST()
68 TEST(TimeTest, FormatToEmptyContainer) { in TEST() function
[all …]
Dscan-test.cc1 // Formatting library for C++ - scanning API test
3 // Copyright (c) 2019 - present, Victor Zverovich
15 #include "gtest-extra.h"
17 TEST(ScanTest, ReadText) { in TEST() function
18 fmt::string_view s = "foo"; in TEST()
19 auto end = fmt::scan(s, "foo"); in TEST()
21 EXPECT_THROW_MSG(fmt::scan("fob", "foo"), fmt::format_error, "invalid input"); in TEST()
24 TEST(ScanTest, ReadInt) { in TEST() function
26 fmt::scan("42", "{}", n); in TEST()
28 fmt::scan("-42", "{}", n); in TEST()
[all …]
Dranges-test.cc1 // Formatting library for C++ - the core API
3 // Copyright (c) 2012 - present, Victor Zverovich
8 // Copyright (c) 2018 - present, Remotion (Igor Schulz)
10 // {fmt} support for ranges, containers and types tuple interface.
12 #include "fmt/ranges.h"
25 TEST(RangesTest, FormatVector) { in TEST() function
27 auto ivf = fmt::format("{}", iv); in TEST()
31 TEST(RangesTest, FormatVector2) { in TEST() function
33 auto ivf = fmt::format("{}", ivv); in TEST()
37 TEST(RangesTest, FormatMap) { in TEST() function
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/util/
DSimpleFormatterTest.java6 * Copyright (C) 2014-2016, International Business Machines Corporation and
10 package android.icu.dev.test.util;
12 import org.junit.Test;
16 import android.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 …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DSimpleFormatterTest.java5 * 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 …]
/external/boringssl/src/util/fipstools/acvp/acvptool/subprocess/
Decdsa.go21 "fmt"
25 // https://pages.nist.gov/ACVP/draft-fussell-acvp-ecdsa.html#name-test-vectors
83 // https://pages.nist.gov/ACVP/draft-fussell-acvp-ecdsa.html#name-test-vectors
87 return nil, fmt.Errorf("curve %q in test group %d not supported", group.Curve, group.ID)
95 for _, test := range group.Tests {
101 …return nil, fmt.Errorf("invalid secret generation mode in test group %d: %q", group.ID, group.Secr…
105 return nil, fmt.Errorf("key generation failed for test case %d/%d: %s", group.ID, test.ID, err)
112 qx, err := hex.DecodeString(test.QxHex)
114 return nil, fmt.Errorf("failed to decode qx in test case %d/%d: %s", group.ID, test.ID, err)
116 qy, err := hex.DecodeString(test.QyHex)
[all …]
DkeyedMac.go20 "fmt"
23 // The following structures reflect the JSON of CMAC-AES tests. See
24 // https://pages.nist.gov/ACVP/draft-fussell-acvp-mac.html#name-test-vectors
71 …return nil, fmt.Errorf("%d bit key in test group %d: fractional bytes not supported", group.KeyBit…
74 …return nil, fmt.Errorf("%d bit message in test group %d: fractional bytes not supported", group.Ke…
77 …return nil, fmt.Errorf("%d bit MAC in test group %d: fractional bytes not supported", group.KeyBit…
87 return nil, fmt.Errorf("unknown test direction %q in test group %d", group.Direction, group.ID)
92 for _, test := range group.Tests {
93 respTest := keyedMACTestResponse{ID: test.ID}
96 if keyBits := uint32(len(test.KeyHex)) * 4; keyBits != group.KeyBits {
[all …]
Daead.go20 "fmt"
71 // See draft-celi-acvp-symmetric.html#table-6. (NIST no longer publish HTML
86 return nil, fmt.Errorf("test group %d has unknown direction %q", group.ID, group.Direction)
95 …return nil, fmt.Errorf("test group %d contains non-byte-multiple key length %d", group.ID, group.K…
100 …return nil, fmt.Errorf("test group %d contains non-byte-multiple tag length %d", group.ID, group.T…
104 for _, test := range group.Tests {
105 if len(test.KeyHex) != keyBytes*2 {
106 …return nil, fmt.Errorf("test case %d/%d contains key %q of length %d, but expected %d-bit key", gr…
109 key, err := hex.DecodeString(test.KeyHex)
111 return nil, fmt.Errorf("failed to decode key in test case %d/%d: %s", group.ID, test.ID, err)
[all …]
/external/boringssl/src/util/
Drun_android_tests.go22 "fmt"
36 buildDir = flag.String("build-dir", "build", "Specifies the build directory to push.")
39 …device = flag.String("device", "", "Specifies the device or emulator. See adb's -s argument.…
41 …apiLevel = flag.Int("api-level", 0, "Specifies the Android API level to use when building Go t…
42 suite = flag.String("suite", "all", "Specifies the test suites to run (all, unit, or ssl).")
43 …allTestsArgs = flag.String("all-tests-args", "", "Specifies space-separated arguments to pass to a…
44 …runnerArgs = flag.String("runner-args", "", "Specifies space-separated arguments to pass to ssl/
45 jsonOutput = flag.String("json-output", "", "The file to output JSON results to.")
58 args = append([]string{"-s", *device}, args...)
69 args = append([]string{"-s", *device}, args...)
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DIntlTestDateFormatAPIC.java5 * 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 …]
DNumberFormatRoundTripTest.java5 * 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 …]
DBigNumberFormatTest.java5 * 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 …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DIntlTestDateFormatAPIC.java6 * Copyright (C) 2001-2010, International Business Machines Corporation and *
13 * Source File: $ICU4CRoot/source/test/intltest/dtfmapts.cpp
16 package android.icu.dev.test.format;
22 import org.junit.Test;
26 import android.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 …]
DNumberFormatRoundTripTest.java6 * Copyright (C) 2001-2010, International Business Machines Corporation and *
13 * Source File: $ICU4CRoot/source/test/intltest/nmfmtrt.cpp
16 package android.icu.dev.test.format;
21 import org.junit.Test;
25 import android.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 …]
DBigNumberFormatTest.java6 * Copyright (C) 1996-2009, International Business Machines Corporation and *
10 package android.icu.dev.test.format;
15 import org.junit.Test;
19 import android.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 …]

12345678910>>...43