Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20e249d4 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Migrate SmsMessageBodyTest to Android Testing Support Library

Bug: 365800992
Test: atest FrameworksTelephonyTests
Flag: TEST_ONLY
Change-Id: Ibcb338d4dd9cb7633ce6d087f382c5fefe456de6
parent f024de84
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -16,13 +16,15 @@

package com.android.internal.telephony;

import android.telephony.TelephonyManager;
import android.test.AndroidTestCase;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import androidx.test.filters.SmallTest;
import android.telephony.TelephonyManager;

import com.android.telephony.Rlog;

import org.junit.Test;

/**
 * Test cases to verify selection of the optimal 7 bit encoding tables
 * (for all combinations of enabled national language tables) for messages
@@ -33,7 +35,7 @@ import com.android.telephony.Rlog;
 * Tests both encoding variations: unsupported characters mapped to space,
 * and unsupported characters force entire message to UCS-2.
 */
public class SmsMessageBodyTest extends AndroidTestCase {
public class SmsMessageBodyTest extends TelephonyTest {
    private static final String TAG = "SmsMessageBodyTest";

    // ASCII chars in the GSM 7 bit default alphabet
@@ -250,7 +252,7 @@ public class SmsMessageBodyTest extends AndroidTestCase {
     */
    private static final int UDH_SEPTET_COST_CONCATENATED_MESSAGE = 6;

    @SmallTest
    @Test
    public void testCalcLengthAscii() throws Exception {
        StringBuilder sb = new StringBuilder(320);
        int[] values = {0, 0, 0, SmsConstants.ENCODING_7BIT, 0, 0};
@@ -282,7 +284,7 @@ public class SmsMessageBodyTest extends AndroidTestCase {
        }
    }

    @SmallTest
    @Test
    public void testCalcLengthUnicode() throws Exception {
        StringBuilder sb = new StringBuilder(160);
        int[] values = {0, 0, 0, SmsConstants.ENCODING_16BIT, 0, 0};
@@ -482,7 +484,7 @@ public class SmsMessageBodyTest extends AndroidTestCase {
        }
    }

    //@LargeTest
    //@Test
    /*public void testCalcLengthMixed7bit() throws Exception {
        StringBuilder sb = new StringBuilder(320);
        CounterHelper ch = new CounterHelper();