void () { PsiField field1 = myClass.findFieldByName("d1", false); assertNotNull(field1); PsiReferenceExpression initializer1 = (PsiReferenceExpression)field1.getInitializer(); assertNotNull(initializer1); assertEquals(PsiTypes.doubleType(), initializer1.getType()); assertEquals("Double.POSITIVE_INFINITY", initializer1.getText()); assertEquals(new Double(Double.POSITIVE_INFINITY), field1.computeConstantValue()); PsiField field2 = myClass.findFieldByName("d2", false); assertNotNull(field2); PsiReferenceExpression initializer2 = (PsiReferenceExpression)field2.getInitializer(); assertNotNull(initializer2); assertEquals(PsiTypes.doubleType(), initializer2.getType()); assertEquals("Double.NEGATIVE_INFINITY", initializer2.getText()); assertEquals(new Double(Double.NEGATIVE_INFINITY), field2.computeConstantValue()); PsiField field3 = myClass.findFieldByName("d3", false); assertNotNull(field3); PsiReferenceExpression initializer3 = (PsiReferenceExpression)field3.getInitializer(); assertNotNull(initializer3); assertEquals(PsiTypes.doubleType(), initializer3.getType()); assertEquals("Double.NaN", initializer3.getText()); assertEquals(new Double(Double.NaN), field3.computeConstantValue()); }