Browse Source

Change the generation of operation name of operation calls to consider upper and lower case names correctly (Fixes issue 53).

markus.muehlbrandt@gmail.com 10 years ago
parent
commit
09f62c837e

+ 1 - 1
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/Naming.xtend

@@ -127,7 +127,7 @@ class Naming extends org.yakindu.sct.generator.c.Naming {
 //	}
 	
 	override asFunction(OperationDefinition it) {
-		name.asIdentifier.toFirstLower	
+		name.asEscapedIdentifier	
 	}
 	
 	override asRaiser(EventDefinition it) {

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/OperationsTestCustom.cc

@@ -70,7 +70,7 @@ void InternalCallBack::internalOperation1() {
 	internalOperation1Called = true;
 }
 
-sc_boolean InternalCallBack::internalOperation2(sc_integer param1) {
+sc_boolean InternalCallBack::InternalOperation2(sc_integer param1) {
 	internalOperation2Called = true;
 	internalOp2Param = param1;
 	return true;
@@ -80,7 +80,7 @@ void Interface1CallBack::interfaceOperation1() {
 	interfaceOperation1Called = true;
 }
 
-sc_boolean Interface1CallBack::interfaceOperation2(sc_integer param1) {
+sc_boolean Interface1CallBack::InterfaceOperation2(sc_integer param1) {
 	interfaceOperation2Called = true;
 	interfaceOp2Param = param1;
 	return true;
@@ -90,7 +90,7 @@ void DefaultCallBack::unnamedInterfaceOperation1() {
 	unnamedInterfaceOperation1Called = true;
 }
 
-sc_boolean DefaultCallBack::unnamedInterfaceOperation2(sc_integer param1) {
+sc_boolean DefaultCallBack::UnnamedInterfaceOperation2(sc_integer param1) {
 	unnamedInterfaceOperation2Called = true;
 	unnamedInterfaceOp2Param = param1;
 	return true;

File diff suppressed because it is too large
+ 158 - 158
test-plugins/org.yakindu.sct.test.models/testmodels/SCTUnit/Operations.sct