时间格式设置成24小时格式会导致CTS 的一些cases failed

1.
libcore.java.text.OldDateFormatTest#test_parseLString FAIL
junit.framework.AssertionFailedError: ParseException was not thrown.
at junit.framework.Assert.fail(Assert.java:50)
at libcore.java.text.OldDateFormatTest.test_parseLString(OldDateFormatTest.java:239)


2.
libcore.java.text.OldDateFormatTest#test_formatLjava_util_Date FAIL
junit.framework.AssertionFailedError: Incorrect date format
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at libcore.java.text.OldDateFormatTest.test_formatLjava_util_Date(OldDateFormatTest.java:94)


3.
libcore.java.text.OldDateFormatTest#test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition FAIL
junit.framework.AssertionFailedError: Incorrect date format
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at libcore.java.text.OldDateFormatTest.test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition(OldDateFormatTest.java:114)

 
4.
org.apache.harmony.tests.java.util.DateTest#test_toLocaleString FAIL
junit.framework.ComparisonFailure: Did not convert epoch to GMT string correctly expected:<Jan 1, 1970 [12:00:00 AM]> but was:<Jan 1, 1970 [00:00:00]>
at junit.framework.Assert.assertEquals(Assert.java:85)
at org.apache.harmony.tests.java.util.DateTest.test_toLocaleString(DateTest.java:493)

 
5.
org.apache.harmony.tests.java.text.MessageFormatTest#test_parseLjava_lang_String FAIL
java.text.ParseException: Parse failure (at offset 22)

at java.text.MessageFormat.parse(MessageFormat.java:827)

at org.apache.harmony.tests.java.text.MessageFormatTest.test_parseLjava_lang_String(MessageFormatTest.java:190)


在CTS5.0_r2上面,这几项testcases不管是12小时还是24小时格式都是可以pass的,但是在CTS5.1_r1上面,设置成24小时格式会fail,所以测试前务必将手机设置成12小时格式,这几项才能pass,用对比机Nexus5去跑也是一样的结果。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值