DateTest.java revision 8ee76d4d3ee58109f859964e56d5c7f3d8c566d9
1/* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package java.util; 18 19import junit.framework.Test; 20import junit.framework.TestSuite; 21 22public class DateTest extends junit.framework.TestCase { 23 // http://code.google.com/p/android/issues/detail?id=6013 24 public void test_toString() throws Exception { 25 // Ensure that no matter where this is run, we know what time zone 26 // to expect. (Though we still assume an "en" locale.) 27 TimeZone.setDefault(TimeZone.getTimeZone("America/Chicago")); 28 assertEquals("Wed Dec 31 18:00:00 CST 1969", new Date(0).toString()); 29 } 30} 31