/* This test is supposed to fail when compiled with with the Kiev
   compiler */
public class ConstantValueTest
{
  final static int i = 10;
  final int j = 11;
  static int k = 20;
  int l = 21;

  static void throwIfNotEqual(String name, int a, int b)
    throws Exception
    {
      if (a != b)
	throw new Exception(name + " = " + a + " (should be "+b+")");
    }

  public static void main(String[] args)
    {
      try {
	throwIfNotEqual("i", i, 10);
	throwIfNotEqual("k", k, 20);
	ConstantValueTest t = new ConstantValueTest();
	System.out.println("PASSED: all values ok");
      } catch (Exception e) {
	System.out.println("FAILED: "+e);
      }
    }

  public ConstantValueTest()
    throws Exception
    {
      throwIfNotEqual("j", j, 11);
      throwIfNotEqual("l", l, 21);
    }
}
