Commit 9b3847e0 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Test for sample references, crashes the compiler and not any

python code for the test harness.
parent 48f898c4
...@@ -720,6 +720,10 @@ aspect CS_Class { ...@@ -720,6 +720,10 @@ aspect CS_Class {
" not declared"); " not declared");
} }
public void SampleRefType.CS_emitTypePrefix(CS_env env) {
env.print("Sample");
}
public void PrimType.CS_emitTypePrefix(CS_env env) { public void PrimType.CS_emitTypePrefix(CS_env env) {
switch (getToken()) { switch (getToken()) {
case LABCOMM_STRING: { env.print("String"); } break; case LABCOMM_STRING: { env.print("String"); } break;
...@@ -844,6 +848,10 @@ aspect CS_Class { ...@@ -844,6 +848,10 @@ aspect CS_Class {
" not declared"); " not declared");
} }
public void SampleRefType.CS_emitType(CS_env env) {
env.print("Sample");
}
public void VoidType.CS_emitType(CS_env env) { public void VoidType.CS_emitType(CS_env env) {
env.print("void"); env.print("void");
} }
......
...@@ -938,6 +938,10 @@ aspect Java_Class { ...@@ -938,6 +938,10 @@ aspect Java_Class {
" not declared"); " not declared");
} }
public void SampleRefType.Java_emitType(Java_env env) {
env.print("Sample");
}
public void VoidType.Java_emitType(Java_env env) { public void VoidType.Java_emitType(Java_env env) {
env.print("void"); env.print("void");
} }
......
...@@ -152,6 +152,10 @@ aspect PythonTypes { ...@@ -152,6 +152,10 @@ aspect PythonTypes {
" not declared"); " not declared");
} }
public void SampleRefType.Python_genSignature(Python_env env) {
env.print("labcomm.SAMPLE_REF()");
}
public void PrimType.Python_genSignature(Python_env env) { public void PrimType.Python_genSignature(Python_env env) {
switch (getToken()) { switch (getToken()) {
case LABCOMM_BOOLEAN: { env.print("labcomm.BOOLEAN()"); } break; case LABCOMM_BOOLEAN: { env.print("labcomm.BOOLEAN()"); } break;
......
TESTS=basic simple nested TESTS=basic simple nested ref
LABCOMM_JAR=../compiler/labcomm_compiler.jar LABCOMM_JAR=../compiler/labcomm_compiler.jar
LABCOMM=java -jar $(LABCOMM_JAR) LABCOMM=java -jar $(LABCOMM_JAR)
......
sample sample usedBoth;
sample sample unusedEncoder;
sample sample unusedDecoder;
sample sample sample_list[4];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment