"Eee PC и Ubuntu Linux. Часть 5.2: Как можно быстрее – любыми способами!"
Сергей Гулин


if (startx) { 
	mkdir("/dev/input", 0755); 
	chardev("/dev/urandom", 0666, 1, 9); 
	chardev("/dev/ptmx", 0666, 5, 2); 
	chardev("/dev/null", 0666, 1, 3); 
	chardev("/dev/mem", 0640, 1, 1); 
	chmod("/dev/null", 0667); 
	chmod("/dev/mem", 0640); 
	chardev("/dev/tty", 0666, 5, 0); 
	chardev("/dev/tty3", 0666, 4, 3); 
	chardev("/dev/input/mice", 0660, 13, 63); 
	chardev("/dev/input/event0", 0660, 13, 64); 
	chardev("/dev/agpgart", 0666, 10, 175); 
	blkdev("/dev/loop0", 0600, 7, 0); 
	xpid = spawnxserver(); 
}


title		Ubuntu 8.04.1, kernel 2.6.24-20-eeepc FINIT
root		(hd0,0)
kernel	/boot/vmlinuz-2.6.24-20-eeepc
				root=UUID=8e94a793-9f1a-4167-8fb8-6abaaad409d5 ro quiet splash
				clocksource=hpet init=/sbin/finit-alt
initrd	/boot/initrd.img-2.6.24-20-eeepc


/sbin/modrpobe pciehp pciehp_debug=1 pciehp_force=1
/sbin/modprobe eeepc_acpi


/etc/init.d/wicd start


/etc/init.d/bluetooth start


loginuser = "serge"


#!/bin/sh
exec /usr/bin/startxfce4


/etc/init.d/gdm start


Xvesa -screen 800x480x32 -dpi 96


$ sudo apt-get install 915resolution


/etc/init.d/915resolution start



------------------------------------------------------------



"Тестирование программного обеспечения Open Source-средствами. Часть 1: JUnit"
Александр Шайхразеев


class Money {
    private int fAmount;
    private String fCurrency;

    public Money(int amount, String currency) {
        fAmount = amount;
        fCurrency = currency;
    }

    public int amount() {
        return fAmount;
    }

    public String currency() {
       return fCurrency;
    }

    public Money add(Money m) {
       return new Money( amount() + m.amount(), currency() );
    }

  public boolean equals(Object anObject) {
       if (anObject instanceof Money) {
           Money aMoney = (Money) anObject;
           return aMoney.currency().equals(currency()) && amount() == aMoney.amount();
       }
       return false;
    }
}


public class MoneyTest extends TestCase {
    public void testSimpleAdd() {
        Money m12CHF = new Money(12, "CHF");
        Money m14CHF = new Money(14, "CHF");
        Money expected = new Money(26, "CHF");
        Money result = m12CHF.add(m14CHF);
        Assert.assertTrue(expected.equals(result));
    }
}


java junit.textui.TestRunner <класс.теста>

java junit.awtui.TestRunner [класс.теста]

java junit.swingui.TestRunner [класс.теста]


java org.junit.runner.JUnitCore [имя_класса.class]


org.junit.runner.JUnitCore.runClasses(имя_класса.class, ...)


@Test
public void simpleAdd() {
    Money m12CHF= new Money(12, "CHF");
    Money m14CHF= new Money(14, "CHF");
    Money expected= new Money(26, "CHF");
    Money result= m12CHF.add(m14CHF);
    assertTrue(expected.equals(result));
}


@Test(expected= IndexOutOfBoundsException.class)
public void empty() {
    new ArrayList<Object>().get(0);
}



------------------------------------------------------------
