package vvk.numbers;

/**
 * Created with IntelliJ IDEA.
 * User: Estraaanged
 * Date: 26.04.14
 * Time: 18:28
 * To change this template use File | Settings | File Templates.
 */
public class PAdicCombinedOperationsTest {
}

@@ -19,207 +19,1180 @@
 s;%0A%0A
-/**%0A * Created with IntelliJ IDEA.%0A * User: Estraaanged%0A * Date: 26.04.14%0A * Time: 18:28%0A * To change this template use File %7C Settings %7C File Templates.%0A */%0Apublic class PAdicCombinedOperationsTest %7B
+import org.junit.Assert;%0Aimport org.junit.Test;%0A%0Apublic class PAdicCombinedOperationsTest %7B%0A%0A    @Test%0A    public void testOperations() %7B%0A        PAdic a = new PAdic(%2211%22, 7);%0A        PAdic b = new PAdic(%222%22, 7);%0A        PAdic c = new PAdic(%2260%22, 7);%0A        PAdic result1 = a.divide(b);%0A        System.out.println(result1);%0A        result1 = result1.subtract(b.multiply(new PAdic(%222%22, 7))).add(new PAdic(%221%22, 7));%0A        System.out.println(result1);%0A        result1 = result1.multiply(c);%0A        System.out.println(result1);%0A        result1 = result1.subtract(a.multiply(new PAdic(%224%22, 7)));%0A        System.out.println(a.multiply(new PAdic(%224%22, 7)));%0A        System.out.println(result1);%0A        System.out.println(%22===========================%22);%0A        PAdic result2 = b.multiply(b).multiply(new PAdic(%222%22, 7)).multiply(new PAdic(-1, 7));%0A        result2 = c.multiply(result2.add(a).add(b)).divide(b);%0A        result2 = result2.subtract(a.multiply(b).multiply(new PAdic(%224%22, 7)).divide(b));%0A        result2 = result2.subtract(b);%0A        System.out.println(result1);%0A        System.out.println(result2);%0A        Assert.assertEquals(b, result1.subtract(result2));%0A    %7D
 %0A%7D%0A

Test with sequence of operations added. TODO: More tests.