Home | History | Annotate | Download | only in multidex
      1 /*
      2  * Copyright (C) 2014 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 
     17 package android.support.multidex;
     18 
     19 import org.junit.Assert;
     20 import org.junit.Test;
     21 
     22 /**
     23  * Test for {@link MultiDex} class.
     24  */
     25 public class MultiDexTest {
     26     @Test
     27     public void testVersionCheck() {
     28         Assert.assertFalse(MultiDex.isVMMultidexCapable(null));
     29         Assert.assertFalse(MultiDex.isVMMultidexCapable("-1.32.54"));
     30         Assert.assertFalse(MultiDex.isVMMultidexCapable("1.32.54"));
     31         Assert.assertFalse(MultiDex.isVMMultidexCapable("1.32"));
     32         Assert.assertFalse(MultiDex.isVMMultidexCapable("2.0"));
     33         Assert.assertFalse(MultiDex.isVMMultidexCapable("2.000.1254"));
     34         Assert.assertTrue(MultiDex.isVMMultidexCapable("2.1.1254"));
     35         Assert.assertTrue(MultiDex.isVMMultidexCapable("2.1"));
     36         Assert.assertTrue(MultiDex.isVMMultidexCapable("2.2"));
     37         Assert.assertTrue(MultiDex.isVMMultidexCapable("2.1.0000"));
     38         Assert.assertTrue(MultiDex.isVMMultidexCapable("2.2.0000"));
     39         Assert.assertTrue(MultiDex.isVMMultidexCapable("002.0001.0010"));
     40         Assert.assertTrue(MultiDex.isVMMultidexCapable("3.0"));
     41         Assert.assertTrue(MultiDex.isVMMultidexCapable("3.0.0"));
     42         Assert.assertTrue(MultiDex.isVMMultidexCapable("3.0.1"));
     43         Assert.assertTrue(MultiDex.isVMMultidexCapable("3.1.0"));
     44         Assert.assertTrue(MultiDex.isVMMultidexCapable("03.1.132645"));
     45         Assert.assertTrue(MultiDex.isVMMultidexCapable("03.2"));
     46     }
     47 }
     48