blob: 51e874fe283f79b5ca4878cc54ac7304911f3335 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*******************************************************************************
* Copyright (c) 2005-2009 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*******************************************************************************/
package org.eclipse.xtend.typesystem.baseimpl.types;
import junit.framework.TestCase;
import org.eclipse.internal.xtend.type.impl.java.JavaMetaModel;
import org.eclipse.internal.xtend.type.impl.java.beans.JavaBeansStrategy;
import org.eclipse.xtend.expression.ExecutionContextImpl;
import org.eclipse.xtend.expression.ExpressionFacade;
public class RealTypeTest extends TestCase {
ExecutionContextImpl ec;
private ExpressionFacade ef;
@Override
protected void setUp() throws Exception {
ec = new ExecutionContextImpl();
ec.registerMetaModel(new JavaMetaModel("asdf", new JavaBeansStrategy()));
ef = new ExpressionFacade(ec);
}
public void testBug172154Equals() {
Boolean result = (Boolean) ef.evaluate("1.1==null");
assertNotNull(result);
assertFalse(result.booleanValue());
}
public void testBug172154NotEquals() {
Boolean result = (Boolean) ef.evaluate("1.1!=null");
assertNotNull(result);
assertTrue(result.booleanValue());
}
}
|