소스 검색

Test for RaiseExpression without parameter created

benjamin.schwertfeger@gmail.com 13 년 전
부모
커밋
ce5f451543
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/TypeInferrerTest.java

+ 11 - 0
test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/TypeInferrerTest.java

@@ -914,6 +914,17 @@ public class TypeInferrerTest extends AbstractSTextTest {
 		analyzer.getType((Statement) statement);
 	}
 
+	@Test
+	public void testEventRaisingException3() {
+		Scope context = createValuedEventsScope();
+		exception.expect(TypeCheckException.class);
+		exception
+				.expectMessage("Can not assign a value of type null to a variable of type string");
+		EObject statement = super.parseExpression("raise stringEvent", context,
+				EventRaisingExpression.class.getSimpleName());
+		analyzer.getType((Statement) statement);
+	}
+
 	/**
 	 * Convenience from here...
 	 */