summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWenyi Wang <wenyiw@google.com>2016-08-19 09:58:57 -0700
committerMarcus Hagerott <mhagerott@google.com>2016-09-29 00:22:36 +0000
commitce4c0a083064e22611136847a78cd09b397bcf0f (patch)
tree35add2cb6291ae3aa89ee0e44ccf934de6676844 /tests
parente0636ab898c83d5a4089faf4f4aad6b71ea993fe (diff)
downloadpackages_apps_Contacts-ce4c0a083064e22611136847a78cd09b397bcf0f.tar.gz
packages_apps_Contacts-ce4c0a083064e22611136847a78cd09b397bcf0f.tar.bz2
packages_apps_Contacts-ce4c0a083064e22611136847a78cd09b397bcf0f.zip
Remove getDayDifference and its test
* The method is not in use after merging contacts and contactsCommon. * And its test is flaky. Bug 27346234 Change-Id: If7a9f18bbc57b76a2fc60a8ecc0d0e636547867f (cherry picked from commit b6a0256a9f9f67964f2129049179f30e90abd5ea)
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/contacts/common/util/DateUtilTests.java62
1 files changed, 0 insertions, 62 deletions
diff --git a/tests/src/com/android/contacts/common/util/DateUtilTests.java b/tests/src/com/android/contacts/common/util/DateUtilTests.java
deleted file mode 100644
index f4602892d..000000000
--- a/tests/src/com/android/contacts/common/util/DateUtilTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package com.android.contacts.common.util;
-
-import junit.framework.TestCase;
-
-import android.test.suitebuilder.annotation.SmallTest;
-import android.text.format.Time;
-
-/**
- * Unit tests for {@link com.android.contacts.common.util.DateUtils}.
- */
-@SmallTest
-public class DateUtilTests extends TestCase {
-
- /**
- * Test date differences which are in the same day.
- */
- public void testDayDiffNone() {
- Time time = new Time();
- long date1 = System.currentTimeMillis();
- long date2 = System.currentTimeMillis() + android.text.format.DateUtils.HOUR_IN_MILLIS;
- assertEquals(0, DateUtils.getDayDifference(time, date1, date2));
- assertEquals(0, DateUtils.getDayDifference(time, date2, date1));
- }
-
- /**
- * Test date differences which are a day apart.
- */
- public void testDayDiffOne() {
- Time time = new Time();
- long date1 = System.currentTimeMillis();
- long date2 = date1 + android.text.format.DateUtils.DAY_IN_MILLIS;
- assertEquals(1, DateUtils.getDayDifference(time, date1, date2));
- assertEquals(1, DateUtils.getDayDifference(time, date2, date1));
- }
-
- /**
- * Test date differences which are two days apart.
- */
- public void testDayDiffTwo() {
- Time time = new Time();
- long date1 = System.currentTimeMillis();
- long date2 = date1 + 2*android.text.format.DateUtils.DAY_IN_MILLIS;
- assertEquals(2, DateUtils.getDayDifference(time, date1, date2));
- assertEquals(2, DateUtils.getDayDifference(time, date2, date1));
- }
-}