Android编程入门-第90天

单元测试:

ExampleUnitTest.java

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
 */
public class ExampleUnitTest {
    @Test
    public void addition_isCorrect() throws Exception {
        assertEquals(4, 2 + 2);
        assertEquals(2, 1 + 2);
        assertEquals(1, 9 + 2);
        assertEquals(10, 5 + 5);
        assertEquals($, 1 + 0);
    }
}


猜你喜欢

转载自blog.csdn.net/qq_33924155/article/details/80623226