xref: /aosp_15_r20/external/cldr/common/testData/units/unitLocalePreferencesTest.txt (revision 912701f9769bb47905792267661f0baf2b85bed5)
1# Test data for unit locale preferences
2#  Copyright © 1991-2024 Unicode, Inc.
3#  For terms of use, see http://www.unicode.org/copyright.html
4#  SPDX-License-Identifier: Unicode-3.0
5#  CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
6#
7# Format:
8#	input-unit; amount; usage;	languageTag; expected-unit; expected-amount # comment
9#
10#   • The amounts are both rationals
11#   • The comment is optional (if it isn't present the # can be omitted)
12#
13# Use: Convert the Input amount & unit according to the Usage and Locale.
14#	 The result should match the Expected amount and unit.
15#
16#	 The input and expected output units are unit identifers; in particular, the output does not have further processing:
17#		 • no localization
18#
19fahrenheit;	1;	default;	en-u-rg-uszzzz-ms-ussystem-mu-celsius;	celsius;	-155/9	# mu > ms > rg > (likely) region
20fahrenheit;	1;	default;	en-u-rg-uszzzz-ms-ussystem-mu-celsius;	celsius;	-155/9
21fahrenheit;	1;	default;	en-u-rg-uszzzz-ms-metric;	celsius;	-155/9
22fahrenheit;	1;	default;	en-u-rg-dezzzz;	celsius;	-155/9
23fahrenheit;	1;	default;	en-DE;	celsius;	-155/9	# explicit region > likely region
24fahrenheit;	1;	default;	en-US;	fahrenheit;	1
25fahrenheit;	1;	default;	en;	fahrenheit;	1	# likely region = US
26gallon-imperial;	2.5;	fluid;	en-u-rg-uszzzz-ms-metric;	liter;	11.365225
27gallon-imperial;	2.5;	fluid;	en-u-rg-dezzzz;	liter;	11.365225
28gallon-imperial;	2.5;	fluid;	en-DE;	liter;	11.365225
29gallon-imperial;	2.5;	fluid;	en-US-u-rg-uszzzz-ms-uksystem;	gallon-imperial;	2.5	# ms-uksystem should behave like GB
30gallon-imperial;	2.5;	fluid;	en-u-rg-gbzzzz;	gallon-imperial;	2.5
31gallon-imperial;	2.5;	fluid;	en-GB;	gallon-imperial;	2.5
32gallon-imperial;	2.5;	fluid;	en-u-rg-uszzzz-ms-ussystem;	gallon;	1,420,653,125/473176473
33gallon-imperial;	2.5;	fluid;	en-u-rg-uszzzz;	gallon;	1,420,653,125/473176473
34gallon-imperial;	2.5;	fluid;	en-US;	gallon;	1,420,653,125/473176473
35gallon-imperial;	2.5;	fluid;	en;	gallon;	1,420,653,125/473176473	# likely region = US
36ampere;	2.5;	default;	en;	ampere;	2.5	# an input unit whose quantity has no preference data should get base units
37pound-force-foot;	12,345;	default;	en;	kilowatt-hour;	0.004649325714486427205
38kilocandela;	1;	default;	en;	candela;	1,000	# an input unit whose quantity has no preference data should get base units
39candela-per-byte;	1;	default;	en;	candela-per-bit;	0.125	# an input unit that has no quantity should get base units
40candela-per-cubic-foot;	1;	default;	en;	candela-per-cubic-meter;	1,953,125,000/55306341	# an input unit that has no quantity should get base units
41foot;	1;	default;	de-u-mu-celsius;	centimeter;	30.48	# a -mu unit that is not convertible from the input unit should get ignored
42#pound;	28;	default;	en-u-mu-stone;	stone;	2 # only temperature units are supported
43