OperationsTest.cc 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393
  1. /* Generated by YAKINDU Statechart Tools code generator. */
  2. #include <algorithm>
  3. #include <list>
  4. #include "gtest/gtest.h"
  5. #include "Operations.h"
  6. #include "OperationsRequired.h"
  7. #include "sc_timer_service.h"
  8. class InternalOperation1Mock{
  9. public:
  10. int callCount;
  11. sc_boolean calledAtLeast(const int times){
  12. return (callCount >= times);
  13. }
  14. sc_boolean calledAtLeastOnce(){
  15. return (callCount>0);
  16. }
  17. void internalOperation1() {
  18. callCount++;
  19. }
  20. void reset() {
  21. callCount = 0;
  22. }
  23. };
  24. static InternalOperation1Mock* internalOperation1Mock;
  25. class InternalOperation2Mock{
  26. struct parameters {
  27. sc_integer param1;
  28. int callCount;
  29. inline bool operator==(const parameters& other) {
  30. return (this->param1 == other.param1);
  31. }
  32. };
  33. public:
  34. std::list<InternalOperation2Mock::parameters> paramCount;
  35. int callCount;
  36. sc_boolean calledAtLeast(const int times){
  37. return (callCount >= times);
  38. }
  39. sc_boolean calledAtLeastOnce(){
  40. return (callCount>0);
  41. }
  42. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  43. parameters p;
  44. p.param1 = param1;
  45. std::list<InternalOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  46. if(i != paramCount.end()) {
  47. return (i->callCount >= times);
  48. }else{
  49. return false;
  50. }
  51. }
  52. sc_boolean calledAtLeastOnce(const sc_integer param1){
  53. parameters p;
  54. p.param1 = param1;
  55. std::list<InternalOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  56. if(i != paramCount.end()) {
  57. return (i->callCount > 0);
  58. }else{
  59. return false;
  60. }
  61. }
  62. void InternalOperation2(const sc_integer param1) {
  63. callCount++;
  64. parameters p;
  65. p.param1 = param1;
  66. std::list<InternalOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  67. if(i != paramCount.end()) {
  68. p.callCount = (i->callCount + 1);
  69. paramCount.erase(i);
  70. }else{
  71. p.callCount = 1;
  72. }
  73. paramCount.push_back(p);
  74. }
  75. void reset() {
  76. callCount = 0;
  77. paramCount.clear();
  78. }
  79. };
  80. static InternalOperation2Mock* internalOperation2Mock;
  81. class InternalOperation3Mock{
  82. public:
  83. int callCount;
  84. sc_boolean calledAtLeast(const int times){
  85. return (callCount >= times);
  86. }
  87. sc_boolean calledAtLeastOnce(){
  88. return (callCount>0);
  89. }
  90. void internalOperation3() {
  91. callCount++;
  92. }
  93. void reset() {
  94. callCount = 0;
  95. }
  96. };
  97. static InternalOperation3Mock* internalOperation3Mock;
  98. class InternalOperation3aMock{
  99. struct parameters {
  100. sc_real param1;
  101. int callCount;
  102. inline bool operator==(const parameters& other) {
  103. return (this->param1 == other.param1);
  104. }
  105. };
  106. public:
  107. std::list<InternalOperation3aMock::parameters> paramCount;
  108. int callCount;
  109. sc_boolean calledAtLeast(const int times){
  110. return (callCount >= times);
  111. }
  112. sc_boolean calledAtLeastOnce(){
  113. return (callCount>0);
  114. }
  115. sc_boolean calledAtLeast(const int times, const sc_real param1){
  116. parameters p;
  117. p.param1 = param1;
  118. std::list<InternalOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  119. if(i != paramCount.end()) {
  120. return (i->callCount >= times);
  121. }else{
  122. return false;
  123. }
  124. }
  125. sc_boolean calledAtLeastOnce(const sc_real param1){
  126. parameters p;
  127. p.param1 = param1;
  128. std::list<InternalOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  129. if(i != paramCount.end()) {
  130. return (i->callCount > 0);
  131. }else{
  132. return false;
  133. }
  134. }
  135. void internalOperation3a(const sc_real param1) {
  136. callCount++;
  137. parameters p;
  138. p.param1 = param1;
  139. std::list<InternalOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  140. if(i != paramCount.end()) {
  141. p.callCount = (i->callCount + 1);
  142. paramCount.erase(i);
  143. }else{
  144. p.callCount = 1;
  145. }
  146. paramCount.push_back(p);
  147. }
  148. void reset() {
  149. callCount = 0;
  150. paramCount.clear();
  151. }
  152. };
  153. static InternalOperation3aMock* internalOperation3aMock;
  154. class InternalOperation4Mock{
  155. public:
  156. int callCount;
  157. sc_boolean calledAtLeast(const int times){
  158. return (callCount >= times);
  159. }
  160. sc_boolean calledAtLeastOnce(){
  161. return (callCount>0);
  162. }
  163. void internalOperation4() {
  164. callCount++;
  165. }
  166. void reset() {
  167. callCount = 0;
  168. }
  169. };
  170. static InternalOperation4Mock* internalOperation4Mock;
  171. class InternalOperation4aMock{
  172. struct parameters {
  173. sc_integer param1;
  174. int callCount;
  175. inline bool operator==(const parameters& other) {
  176. return (this->param1 == other.param1);
  177. }
  178. };
  179. public:
  180. std::list<InternalOperation4aMock::parameters> paramCount;
  181. int callCount;
  182. sc_boolean calledAtLeast(const int times){
  183. return (callCount >= times);
  184. }
  185. sc_boolean calledAtLeastOnce(){
  186. return (callCount>0);
  187. }
  188. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  189. parameters p;
  190. p.param1 = param1;
  191. std::list<InternalOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  192. if(i != paramCount.end()) {
  193. return (i->callCount >= times);
  194. }else{
  195. return false;
  196. }
  197. }
  198. sc_boolean calledAtLeastOnce(const sc_integer param1){
  199. parameters p;
  200. p.param1 = param1;
  201. std::list<InternalOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  202. if(i != paramCount.end()) {
  203. return (i->callCount > 0);
  204. }else{
  205. return false;
  206. }
  207. }
  208. void internalOperation4a(const sc_integer param1) {
  209. callCount++;
  210. parameters p;
  211. p.param1 = param1;
  212. std::list<InternalOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  213. if(i != paramCount.end()) {
  214. p.callCount = (i->callCount + 1);
  215. paramCount.erase(i);
  216. }else{
  217. p.callCount = 1;
  218. }
  219. paramCount.push_back(p);
  220. }
  221. void reset() {
  222. callCount = 0;
  223. paramCount.clear();
  224. }
  225. };
  226. static InternalOperation4aMock* internalOperation4aMock;
  227. class InternalOperation5Mock{
  228. public:
  229. int callCount;
  230. sc_boolean calledAtLeast(const int times){
  231. return (callCount >= times);
  232. }
  233. sc_boolean calledAtLeastOnce(){
  234. return (callCount>0);
  235. }
  236. void internalOperation5() {
  237. callCount++;
  238. }
  239. void reset() {
  240. callCount = 0;
  241. }
  242. };
  243. static InternalOperation5Mock* internalOperation5Mock;
  244. class InternalOperation5aMock{
  245. struct parameters {
  246. const sc_string param1;
  247. int callCount;
  248. inline bool operator==(const parameters& other) {
  249. return (this->param1 == other.param1);
  250. }
  251. };
  252. public:
  253. std::list<InternalOperation5aMock::parameters> paramCount;
  254. int callCount;
  255. sc_boolean calledAtLeast(const int times){
  256. return (callCount >= times);
  257. }
  258. sc_boolean calledAtLeastOnce(){
  259. return (callCount>0);
  260. }
  261. sc_boolean calledAtLeast(const int times, const sc_string param1){
  262. parameters p;
  263. p.param1 = param1;
  264. std::list<InternalOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  265. if(i != paramCount.end()) {
  266. return (i->callCount >= times);
  267. }else{
  268. return false;
  269. }
  270. }
  271. sc_boolean calledAtLeastOnce(const sc_string param1){
  272. parameters p;
  273. p.param1 = param1;
  274. std::list<InternalOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  275. if(i != paramCount.end()) {
  276. return (i->callCount > 0);
  277. }else{
  278. return false;
  279. }
  280. }
  281. void internalOperation5a(const sc_string param1) {
  282. callCount++;
  283. parameters p;
  284. p.param1 = param1;
  285. std::list<InternalOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  286. if(i != paramCount.end()) {
  287. p.callCount = (i->callCount + 1);
  288. paramCount.erase(i);
  289. }else{
  290. p.callCount = 1;
  291. }
  292. paramCount.push_back(p);
  293. }
  294. void reset() {
  295. callCount = 0;
  296. paramCount.clear();
  297. }
  298. };
  299. static InternalOperation5aMock* internalOperation5aMock;
  300. class Interface1InterfaceOperation1Mock{
  301. public:
  302. int callCount;
  303. sc_boolean calledAtLeast(const int times){
  304. return (callCount >= times);
  305. }
  306. sc_boolean calledAtLeastOnce(){
  307. return (callCount>0);
  308. }
  309. void interfaceOperation1() {
  310. callCount++;
  311. }
  312. void reset() {
  313. callCount = 0;
  314. }
  315. };
  316. static Interface1InterfaceOperation1Mock* interface1InterfaceOperation1Mock;
  317. class Interface1InterfaceOperation2Mock{
  318. struct parameters {
  319. sc_integer param1;
  320. int callCount;
  321. inline bool operator==(const parameters& other) {
  322. return (this->param1 == other.param1);
  323. }
  324. };
  325. public:
  326. std::list<Interface1InterfaceOperation2Mock::parameters> paramCount;
  327. int callCount;
  328. sc_boolean calledAtLeast(const int times){
  329. return (callCount >= times);
  330. }
  331. sc_boolean calledAtLeastOnce(){
  332. return (callCount>0);
  333. }
  334. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  335. parameters p;
  336. p.param1 = param1;
  337. std::list<Interface1InterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  338. if(i != paramCount.end()) {
  339. return (i->callCount >= times);
  340. }else{
  341. return false;
  342. }
  343. }
  344. sc_boolean calledAtLeastOnce(const sc_integer param1){
  345. parameters p;
  346. p.param1 = param1;
  347. std::list<Interface1InterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  348. if(i != paramCount.end()) {
  349. return (i->callCount > 0);
  350. }else{
  351. return false;
  352. }
  353. }
  354. void InterfaceOperation2(const sc_integer param1) {
  355. callCount++;
  356. parameters p;
  357. p.param1 = param1;
  358. std::list<Interface1InterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  359. if(i != paramCount.end()) {
  360. p.callCount = (i->callCount + 1);
  361. paramCount.erase(i);
  362. }else{
  363. p.callCount = 1;
  364. }
  365. paramCount.push_back(p);
  366. }
  367. void reset() {
  368. callCount = 0;
  369. paramCount.clear();
  370. }
  371. };
  372. static Interface1InterfaceOperation2Mock* interface1InterfaceOperation2Mock;
  373. class Interface1InterfaceOperation3Mock{
  374. public:
  375. int callCount;
  376. sc_boolean calledAtLeast(const int times){
  377. return (callCount >= times);
  378. }
  379. sc_boolean calledAtLeastOnce(){
  380. return (callCount>0);
  381. }
  382. void interfaceOperation3() {
  383. callCount++;
  384. }
  385. void reset() {
  386. callCount = 0;
  387. }
  388. };
  389. static Interface1InterfaceOperation3Mock* interface1InterfaceOperation3Mock;
  390. class Interface1InterfaceOperation3aMock{
  391. struct parameters {
  392. sc_real param1;
  393. int callCount;
  394. inline bool operator==(const parameters& other) {
  395. return (this->param1 == other.param1);
  396. }
  397. };
  398. public:
  399. std::list<Interface1InterfaceOperation3aMock::parameters> paramCount;
  400. int callCount;
  401. sc_boolean calledAtLeast(const int times){
  402. return (callCount >= times);
  403. }
  404. sc_boolean calledAtLeastOnce(){
  405. return (callCount>0);
  406. }
  407. sc_boolean calledAtLeast(const int times, const sc_real param1){
  408. parameters p;
  409. p.param1 = param1;
  410. std::list<Interface1InterfaceOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  411. if(i != paramCount.end()) {
  412. return (i->callCount >= times);
  413. }else{
  414. return false;
  415. }
  416. }
  417. sc_boolean calledAtLeastOnce(const sc_real param1){
  418. parameters p;
  419. p.param1 = param1;
  420. std::list<Interface1InterfaceOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  421. if(i != paramCount.end()) {
  422. return (i->callCount > 0);
  423. }else{
  424. return false;
  425. }
  426. }
  427. void interfaceOperation3a(const sc_real param1) {
  428. callCount++;
  429. parameters p;
  430. p.param1 = param1;
  431. std::list<Interface1InterfaceOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  432. if(i != paramCount.end()) {
  433. p.callCount = (i->callCount + 1);
  434. paramCount.erase(i);
  435. }else{
  436. p.callCount = 1;
  437. }
  438. paramCount.push_back(p);
  439. }
  440. void reset() {
  441. callCount = 0;
  442. paramCount.clear();
  443. }
  444. };
  445. static Interface1InterfaceOperation3aMock* interface1InterfaceOperation3aMock;
  446. class Interface1InterfaceOperation4Mock{
  447. public:
  448. int callCount;
  449. sc_boolean calledAtLeast(const int times){
  450. return (callCount >= times);
  451. }
  452. sc_boolean calledAtLeastOnce(){
  453. return (callCount>0);
  454. }
  455. void interfaceOperation4() {
  456. callCount++;
  457. }
  458. void reset() {
  459. callCount = 0;
  460. }
  461. };
  462. static Interface1InterfaceOperation4Mock* interface1InterfaceOperation4Mock;
  463. class Interface1InterfaceOperation4aMock{
  464. struct parameters {
  465. sc_integer param1;
  466. int callCount;
  467. inline bool operator==(const parameters& other) {
  468. return (this->param1 == other.param1);
  469. }
  470. };
  471. public:
  472. std::list<Interface1InterfaceOperation4aMock::parameters> paramCount;
  473. int callCount;
  474. sc_boolean calledAtLeast(const int times){
  475. return (callCount >= times);
  476. }
  477. sc_boolean calledAtLeastOnce(){
  478. return (callCount>0);
  479. }
  480. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  481. parameters p;
  482. p.param1 = param1;
  483. std::list<Interface1InterfaceOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  484. if(i != paramCount.end()) {
  485. return (i->callCount >= times);
  486. }else{
  487. return false;
  488. }
  489. }
  490. sc_boolean calledAtLeastOnce(const sc_integer param1){
  491. parameters p;
  492. p.param1 = param1;
  493. std::list<Interface1InterfaceOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  494. if(i != paramCount.end()) {
  495. return (i->callCount > 0);
  496. }else{
  497. return false;
  498. }
  499. }
  500. void interfaceOperation4a(const sc_integer param1) {
  501. callCount++;
  502. parameters p;
  503. p.param1 = param1;
  504. std::list<Interface1InterfaceOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  505. if(i != paramCount.end()) {
  506. p.callCount = (i->callCount + 1);
  507. paramCount.erase(i);
  508. }else{
  509. p.callCount = 1;
  510. }
  511. paramCount.push_back(p);
  512. }
  513. void reset() {
  514. callCount = 0;
  515. paramCount.clear();
  516. }
  517. };
  518. static Interface1InterfaceOperation4aMock* interface1InterfaceOperation4aMock;
  519. class Interface1InterfaceOperation5Mock{
  520. public:
  521. int callCount;
  522. sc_boolean calledAtLeast(const int times){
  523. return (callCount >= times);
  524. }
  525. sc_boolean calledAtLeastOnce(){
  526. return (callCount>0);
  527. }
  528. void interfaceOperation5() {
  529. callCount++;
  530. }
  531. void reset() {
  532. callCount = 0;
  533. }
  534. };
  535. static Interface1InterfaceOperation5Mock* interface1InterfaceOperation5Mock;
  536. class Interface1InterfaceOperation5aMock{
  537. struct parameters {
  538. const sc_string param1;
  539. int callCount;
  540. inline bool operator==(const parameters& other) {
  541. return (this->param1 == other.param1);
  542. }
  543. };
  544. public:
  545. std::list<Interface1InterfaceOperation5aMock::parameters> paramCount;
  546. int callCount;
  547. sc_boolean calledAtLeast(const int times){
  548. return (callCount >= times);
  549. }
  550. sc_boolean calledAtLeastOnce(){
  551. return (callCount>0);
  552. }
  553. sc_boolean calledAtLeast(const int times, const sc_string param1){
  554. parameters p;
  555. p.param1 = param1;
  556. std::list<Interface1InterfaceOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  557. if(i != paramCount.end()) {
  558. return (i->callCount >= times);
  559. }else{
  560. return false;
  561. }
  562. }
  563. sc_boolean calledAtLeastOnce(const sc_string param1){
  564. parameters p;
  565. p.param1 = param1;
  566. std::list<Interface1InterfaceOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  567. if(i != paramCount.end()) {
  568. return (i->callCount > 0);
  569. }else{
  570. return false;
  571. }
  572. }
  573. void interfaceOperation5a(const sc_string param1) {
  574. callCount++;
  575. parameters p;
  576. p.param1 = param1;
  577. std::list<Interface1InterfaceOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  578. if(i != paramCount.end()) {
  579. p.callCount = (i->callCount + 1);
  580. paramCount.erase(i);
  581. }else{
  582. p.callCount = 1;
  583. }
  584. paramCount.push_back(p);
  585. }
  586. void reset() {
  587. callCount = 0;
  588. paramCount.clear();
  589. }
  590. };
  591. static Interface1InterfaceOperation5aMock* interface1InterfaceOperation5aMock;
  592. class UnnamedInterfaceOperation1Mock{
  593. public:
  594. int callCount;
  595. sc_boolean calledAtLeast(const int times){
  596. return (callCount >= times);
  597. }
  598. sc_boolean calledAtLeastOnce(){
  599. return (callCount>0);
  600. }
  601. void unnamedInterfaceOperation1() {
  602. callCount++;
  603. }
  604. void reset() {
  605. callCount = 0;
  606. }
  607. };
  608. static UnnamedInterfaceOperation1Mock* unnamedInterfaceOperation1Mock;
  609. class UnnamedInterfaceOperation2Mock{
  610. struct parameters {
  611. sc_integer param1;
  612. int callCount;
  613. inline bool operator==(const parameters& other) {
  614. return (this->param1 == other.param1);
  615. }
  616. };
  617. public:
  618. std::list<UnnamedInterfaceOperation2Mock::parameters> paramCount;
  619. int callCount;
  620. sc_boolean calledAtLeast(const int times){
  621. return (callCount >= times);
  622. }
  623. sc_boolean calledAtLeastOnce(){
  624. return (callCount>0);
  625. }
  626. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  627. parameters p;
  628. p.param1 = param1;
  629. std::list<UnnamedInterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  630. if(i != paramCount.end()) {
  631. return (i->callCount >= times);
  632. }else{
  633. return false;
  634. }
  635. }
  636. sc_boolean calledAtLeastOnce(const sc_integer param1){
  637. parameters p;
  638. p.param1 = param1;
  639. std::list<UnnamedInterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  640. if(i != paramCount.end()) {
  641. return (i->callCount > 0);
  642. }else{
  643. return false;
  644. }
  645. }
  646. void UnnamedInterfaceOperation2(const sc_integer param1) {
  647. callCount++;
  648. parameters p;
  649. p.param1 = param1;
  650. std::list<UnnamedInterfaceOperation2Mock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  651. if(i != paramCount.end()) {
  652. p.callCount = (i->callCount + 1);
  653. paramCount.erase(i);
  654. }else{
  655. p.callCount = 1;
  656. }
  657. paramCount.push_back(p);
  658. }
  659. void reset() {
  660. callCount = 0;
  661. paramCount.clear();
  662. }
  663. };
  664. static UnnamedInterfaceOperation2Mock* unnamedInterfaceOperation2Mock;
  665. class UnnamedOperation3Mock{
  666. public:
  667. int callCount;
  668. sc_boolean calledAtLeast(const int times){
  669. return (callCount >= times);
  670. }
  671. sc_boolean calledAtLeastOnce(){
  672. return (callCount>0);
  673. }
  674. void unnamedOperation3() {
  675. callCount++;
  676. }
  677. void reset() {
  678. callCount = 0;
  679. }
  680. };
  681. static UnnamedOperation3Mock* unnamedOperation3Mock;
  682. class UnnamedOperation3aMock{
  683. struct parameters {
  684. sc_real param1;
  685. int callCount;
  686. inline bool operator==(const parameters& other) {
  687. return (this->param1 == other.param1);
  688. }
  689. };
  690. public:
  691. std::list<UnnamedOperation3aMock::parameters> paramCount;
  692. int callCount;
  693. sc_boolean calledAtLeast(const int times){
  694. return (callCount >= times);
  695. }
  696. sc_boolean calledAtLeastOnce(){
  697. return (callCount>0);
  698. }
  699. sc_boolean calledAtLeast(const int times, const sc_real param1){
  700. parameters p;
  701. p.param1 = param1;
  702. std::list<UnnamedOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  703. if(i != paramCount.end()) {
  704. return (i->callCount >= times);
  705. }else{
  706. return false;
  707. }
  708. }
  709. sc_boolean calledAtLeastOnce(const sc_real param1){
  710. parameters p;
  711. p.param1 = param1;
  712. std::list<UnnamedOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  713. if(i != paramCount.end()) {
  714. return (i->callCount > 0);
  715. }else{
  716. return false;
  717. }
  718. }
  719. void unnamedOperation3a(const sc_real param1) {
  720. callCount++;
  721. parameters p;
  722. p.param1 = param1;
  723. std::list<UnnamedOperation3aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  724. if(i != paramCount.end()) {
  725. p.callCount = (i->callCount + 1);
  726. paramCount.erase(i);
  727. }else{
  728. p.callCount = 1;
  729. }
  730. paramCount.push_back(p);
  731. }
  732. void reset() {
  733. callCount = 0;
  734. paramCount.clear();
  735. }
  736. };
  737. static UnnamedOperation3aMock* unnamedOperation3aMock;
  738. class UnnamedOperation4Mock{
  739. public:
  740. int callCount;
  741. sc_boolean calledAtLeast(const int times){
  742. return (callCount >= times);
  743. }
  744. sc_boolean calledAtLeastOnce(){
  745. return (callCount>0);
  746. }
  747. void unnamedOperation4() {
  748. callCount++;
  749. }
  750. void reset() {
  751. callCount = 0;
  752. }
  753. };
  754. static UnnamedOperation4Mock* unnamedOperation4Mock;
  755. class UnnamedOperation4aMock{
  756. struct parameters {
  757. sc_integer param1;
  758. int callCount;
  759. inline bool operator==(const parameters& other) {
  760. return (this->param1 == other.param1);
  761. }
  762. };
  763. public:
  764. std::list<UnnamedOperation4aMock::parameters> paramCount;
  765. int callCount;
  766. sc_boolean calledAtLeast(const int times){
  767. return (callCount >= times);
  768. }
  769. sc_boolean calledAtLeastOnce(){
  770. return (callCount>0);
  771. }
  772. sc_boolean calledAtLeast(const int times, const sc_integer param1){
  773. parameters p;
  774. p.param1 = param1;
  775. std::list<UnnamedOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  776. if(i != paramCount.end()) {
  777. return (i->callCount >= times);
  778. }else{
  779. return false;
  780. }
  781. }
  782. sc_boolean calledAtLeastOnce(const sc_integer param1){
  783. parameters p;
  784. p.param1 = param1;
  785. std::list<UnnamedOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  786. if(i != paramCount.end()) {
  787. return (i->callCount > 0);
  788. }else{
  789. return false;
  790. }
  791. }
  792. void unnamedOperation4a(const sc_integer param1) {
  793. callCount++;
  794. parameters p;
  795. p.param1 = param1;
  796. std::list<UnnamedOperation4aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  797. if(i != paramCount.end()) {
  798. p.callCount = (i->callCount + 1);
  799. paramCount.erase(i);
  800. }else{
  801. p.callCount = 1;
  802. }
  803. paramCount.push_back(p);
  804. }
  805. void reset() {
  806. callCount = 0;
  807. paramCount.clear();
  808. }
  809. };
  810. static UnnamedOperation4aMock* unnamedOperation4aMock;
  811. class UnnamedOperation5Mock{
  812. public:
  813. int callCount;
  814. sc_boolean calledAtLeast(const int times){
  815. return (callCount >= times);
  816. }
  817. sc_boolean calledAtLeastOnce(){
  818. return (callCount>0);
  819. }
  820. void unnamedOperation5() {
  821. callCount++;
  822. }
  823. void reset() {
  824. callCount = 0;
  825. }
  826. };
  827. static UnnamedOperation5Mock* unnamedOperation5Mock;
  828. class UnnamedOperation5aMock{
  829. struct parameters {
  830. const sc_string param1;
  831. int callCount;
  832. inline bool operator==(const parameters& other) {
  833. return (this->param1 == other.param1);
  834. }
  835. };
  836. public:
  837. std::list<UnnamedOperation5aMock::parameters> paramCount;
  838. int callCount;
  839. sc_boolean calledAtLeast(const int times){
  840. return (callCount >= times);
  841. }
  842. sc_boolean calledAtLeastOnce(){
  843. return (callCount>0);
  844. }
  845. sc_boolean calledAtLeast(const int times, const sc_string param1){
  846. parameters p;
  847. p.param1 = param1;
  848. std::list<UnnamedOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  849. if(i != paramCount.end()) {
  850. return (i->callCount >= times);
  851. }else{
  852. return false;
  853. }
  854. }
  855. sc_boolean calledAtLeastOnce(const sc_string param1){
  856. parameters p;
  857. p.param1 = param1;
  858. std::list<UnnamedOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  859. if(i != paramCount.end()) {
  860. return (i->callCount > 0);
  861. }else{
  862. return false;
  863. }
  864. }
  865. void unnamedOperation5a(const sc_string param1) {
  866. callCount++;
  867. parameters p;
  868. p.param1 = param1;
  869. std::list<UnnamedOperation5aMock::parameters>::iterator i = std::find(paramCount.begin(), paramCount.end(), p);
  870. if(i != paramCount.end()) {
  871. p.callCount = (i->callCount + 1);
  872. paramCount.erase(i);
  873. }else{
  874. p.callCount = 1;
  875. }
  876. paramCount.push_back(p);
  877. }
  878. void reset() {
  879. callCount = 0;
  880. paramCount.clear();
  881. }
  882. };
  883. static UnnamedOperation5aMock* unnamedOperation5aMock;
  884. class AlwaysTrueMock{
  885. typedef sc_boolean (AlwaysTrueMock::*functiontype)();
  886. public:
  887. sc_boolean (AlwaysTrueMock::*alwaysTrueBehaviorDefault)();
  888. sc_boolean alwaysTrue1(){
  889. return (true);
  890. }
  891. sc_boolean alwaysTrueDefault(){
  892. return (false);
  893. }
  894. functiontype getBehavior(){
  895. return alwaysTrueBehaviorDefault;
  896. }
  897. void setDefaultBehavior(sc_boolean (AlwaysTrueMock::*defaultBehavior)()){
  898. alwaysTrueBehaviorDefault = defaultBehavior;
  899. }
  900. void initializeBehavior() {
  901. setDefaultBehavior(&AlwaysTrueMock::alwaysTrueDefault);
  902. }
  903. void reset() {
  904. initializeBehavior();
  905. }
  906. };
  907. static AlwaysTrueMock* alwaysTrueMock;
  908. //! The timers are managed by a timer service. */
  909. static sc_unit_timer_service_t timer_service;
  910. static Operations statechart;
  911. class OperationsTest : public ::testing::Test{
  912. protected:
  913. virtual void SetUp() {
  914. operations_init(&statechart);
  915. sc_timer_service_init(
  916. &timer_service,
  917. 0,
  918. (sc_run_cycle_fp) &operations_runCycle,
  919. false,
  920. 200,
  921. &statechart
  922. );
  923. }
  924. };
  925. TEST_F(OperationsTest, operationsCalled) {
  926. alwaysTrueMock = new AlwaysTrueMock();
  927. alwaysTrueMock->initializeBehavior();
  928. internalOperation1Mock = new InternalOperation1Mock();
  929. internalOperation2Mock = new InternalOperation2Mock();
  930. internalOperation3Mock = new InternalOperation3Mock();
  931. internalOperation3aMock = new InternalOperation3aMock();
  932. internalOperation4Mock = new InternalOperation4Mock();
  933. internalOperation4aMock = new InternalOperation4aMock();
  934. internalOperation5Mock = new InternalOperation5Mock();
  935. internalOperation5aMock = new InternalOperation5aMock();
  936. interface1InterfaceOperation1Mock = new Interface1InterfaceOperation1Mock();
  937. interface1InterfaceOperation2Mock = new Interface1InterfaceOperation2Mock();
  938. interface1InterfaceOperation3Mock = new Interface1InterfaceOperation3Mock();
  939. interface1InterfaceOperation3aMock = new Interface1InterfaceOperation3aMock();
  940. interface1InterfaceOperation4Mock = new Interface1InterfaceOperation4Mock();
  941. interface1InterfaceOperation4aMock = new Interface1InterfaceOperation4aMock();
  942. interface1InterfaceOperation5Mock = new Interface1InterfaceOperation5Mock();
  943. interface1InterfaceOperation5aMock = new Interface1InterfaceOperation5aMock();
  944. unnamedInterfaceOperation1Mock = new UnnamedInterfaceOperation1Mock();
  945. unnamedInterfaceOperation2Mock = new UnnamedInterfaceOperation2Mock();
  946. unnamedOperation3Mock = new UnnamedOperation3Mock();
  947. unnamedOperation3aMock = new UnnamedOperation3aMock();
  948. unnamedOperation4Mock = new UnnamedOperation4Mock();
  949. unnamedOperation4aMock = new UnnamedOperation4aMock();
  950. unnamedOperation5Mock = new UnnamedOperation5Mock();
  951. unnamedOperation5aMock = new UnnamedOperation5aMock();
  952. alwaysTrueMock->setDefaultBehavior(&AlwaysTrueMock::alwaysTrue1);
  953. operations_enter(&statechart);
  954. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_A));
  955. sc_timer_service_proceed_cycles(&timer_service, 1);
  956. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_B));
  957. EXPECT_TRUE(internalOperation1Mock->calledAtLeastOnce());
  958. EXPECT_TRUE(internalOperation2Mock->calledAtLeastOnce(4l));
  959. EXPECT_TRUE(internalOperation3Mock->calledAtLeastOnce());
  960. EXPECT_TRUE(internalOperation3aMock->calledAtLeastOnce(1.0));
  961. EXPECT_TRUE(internalOperation4Mock->calledAtLeastOnce());
  962. EXPECT_TRUE(internalOperation4aMock->calledAtLeastOnce(5l));
  963. EXPECT_TRUE(internalOperation5Mock->calledAtLeastOnce());
  964. EXPECT_TRUE(internalOperation5aMock->calledAtLeastOnce());
  965. operationsIface_raise_ev(&statechart);
  966. sc_timer_service_proceed_cycles(&timer_service, 1);
  967. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_C));
  968. EXPECT_TRUE(interface1InterfaceOperation1Mock->calledAtLeastOnce());
  969. EXPECT_TRUE(interface1InterfaceOperation2Mock->calledAtLeastOnce(4l));
  970. EXPECT_TRUE(interface1InterfaceOperation3Mock->calledAtLeastOnce());
  971. EXPECT_TRUE(interface1InterfaceOperation3aMock->calledAtLeastOnce(1.0));
  972. EXPECT_TRUE(interface1InterfaceOperation4Mock->calledAtLeastOnce());
  973. EXPECT_TRUE(interface1InterfaceOperation4aMock->calledAtLeastOnce(5l));
  974. EXPECT_TRUE(interface1InterfaceOperation5Mock->calledAtLeastOnce());
  975. EXPECT_TRUE(interface1InterfaceOperation5aMock->calledAtLeastOnce());
  976. operationsIface_raise_ev(&statechart);
  977. sc_timer_service_proceed_cycles(&timer_service, 1);
  978. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_D));
  979. EXPECT_TRUE(unnamedInterfaceOperation1Mock->calledAtLeastOnce());
  980. EXPECT_TRUE(unnamedInterfaceOperation2Mock->calledAtLeastOnce(4l));
  981. EXPECT_TRUE(unnamedOperation3Mock->calledAtLeastOnce());
  982. EXPECT_TRUE(unnamedOperation3aMock->calledAtLeastOnce(1.0));
  983. EXPECT_TRUE(unnamedOperation4Mock->calledAtLeastOnce());
  984. EXPECT_TRUE(unnamedOperation4aMock->calledAtLeastOnce(5l));
  985. EXPECT_TRUE(unnamedOperation5Mock->calledAtLeastOnce());
  986. EXPECT_TRUE(unnamedOperation5aMock->calledAtLeastOnce());
  987. alwaysTrueMock->reset();
  988. internalOperation1Mock->reset();
  989. internalOperation2Mock->reset();
  990. internalOperation3Mock->reset();
  991. internalOperation3aMock->reset();
  992. internalOperation4Mock->reset();
  993. internalOperation4aMock->reset();
  994. internalOperation5Mock->reset();
  995. internalOperation5aMock->reset();
  996. interface1InterfaceOperation1Mock->reset();
  997. interface1InterfaceOperation2Mock->reset();
  998. interface1InterfaceOperation3Mock->reset();
  999. interface1InterfaceOperation3aMock->reset();
  1000. interface1InterfaceOperation4Mock->reset();
  1001. interface1InterfaceOperation4aMock->reset();
  1002. interface1InterfaceOperation5Mock->reset();
  1003. interface1InterfaceOperation5aMock->reset();
  1004. unnamedInterfaceOperation1Mock->reset();
  1005. unnamedInterfaceOperation2Mock->reset();
  1006. unnamedOperation3Mock->reset();
  1007. unnamedOperation3aMock->reset();
  1008. unnamedOperation4Mock->reset();
  1009. unnamedOperation4aMock->reset();
  1010. unnamedOperation5Mock->reset();
  1011. unnamedOperation5aMock->reset();
  1012. }
  1013. TEST_F(OperationsTest, operationsNotCalled) {
  1014. alwaysTrueMock = new AlwaysTrueMock();
  1015. alwaysTrueMock->initializeBehavior();
  1016. internalOperation1Mock = new InternalOperation1Mock();
  1017. internalOperation2Mock = new InternalOperation2Mock();
  1018. internalOperation3Mock = new InternalOperation3Mock();
  1019. internalOperation3aMock = new InternalOperation3aMock();
  1020. internalOperation4Mock = new InternalOperation4Mock();
  1021. internalOperation4aMock = new InternalOperation4aMock();
  1022. internalOperation5Mock = new InternalOperation5Mock();
  1023. internalOperation5aMock = new InternalOperation5aMock();
  1024. interface1InterfaceOperation1Mock = new Interface1InterfaceOperation1Mock();
  1025. interface1InterfaceOperation2Mock = new Interface1InterfaceOperation2Mock();
  1026. interface1InterfaceOperation3Mock = new Interface1InterfaceOperation3Mock();
  1027. interface1InterfaceOperation3aMock = new Interface1InterfaceOperation3aMock();
  1028. interface1InterfaceOperation4Mock = new Interface1InterfaceOperation4Mock();
  1029. interface1InterfaceOperation4aMock = new Interface1InterfaceOperation4aMock();
  1030. interface1InterfaceOperation5Mock = new Interface1InterfaceOperation5Mock();
  1031. interface1InterfaceOperation5aMock = new Interface1InterfaceOperation5aMock();
  1032. unnamedInterfaceOperation1Mock = new UnnamedInterfaceOperation1Mock();
  1033. unnamedInterfaceOperation2Mock = new UnnamedInterfaceOperation2Mock();
  1034. unnamedOperation3Mock = new UnnamedOperation3Mock();
  1035. unnamedOperation3aMock = new UnnamedOperation3aMock();
  1036. unnamedOperation4Mock = new UnnamedOperation4Mock();
  1037. unnamedOperation4aMock = new UnnamedOperation4aMock();
  1038. unnamedOperation5Mock = new UnnamedOperation5Mock();
  1039. unnamedOperation5aMock = new UnnamedOperation5aMock();
  1040. alwaysTrueMock->setDefaultBehavior(&AlwaysTrueMock::alwaysTrue1);
  1041. operations_enter(&statechart);
  1042. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_A));
  1043. EXPECT_FALSE(internalOperation1Mock->calledAtLeastOnce());
  1044. EXPECT_FALSE(internalOperation2Mock->calledAtLeastOnce(4l));
  1045. EXPECT_FALSE(internalOperation3Mock->calledAtLeastOnce());
  1046. EXPECT_FALSE(internalOperation3aMock->calledAtLeastOnce(1.0));
  1047. EXPECT_FALSE(internalOperation4Mock->calledAtLeastOnce());
  1048. EXPECT_FALSE(internalOperation4aMock->calledAtLeastOnce(5l));
  1049. EXPECT_FALSE(internalOperation5Mock->calledAtLeastOnce());
  1050. EXPECT_FALSE(internalOperation5aMock->calledAtLeastOnce());
  1051. operationsIface_raise_ev(&statechart);
  1052. sc_timer_service_proceed_cycles(&timer_service, 1);
  1053. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_B));
  1054. EXPECT_FALSE(interface1InterfaceOperation1Mock->calledAtLeastOnce());
  1055. EXPECT_FALSE(interface1InterfaceOperation2Mock->calledAtLeastOnce(4l));
  1056. EXPECT_FALSE(interface1InterfaceOperation3Mock->calledAtLeastOnce());
  1057. EXPECT_FALSE(interface1InterfaceOperation3aMock->calledAtLeastOnce(1.0));
  1058. EXPECT_FALSE(interface1InterfaceOperation4Mock->calledAtLeastOnce());
  1059. EXPECT_FALSE(interface1InterfaceOperation4aMock->calledAtLeastOnce(5l));
  1060. EXPECT_FALSE(interface1InterfaceOperation5Mock->calledAtLeastOnce());
  1061. EXPECT_FALSE(interface1InterfaceOperation5aMock->calledAtLeastOnce());
  1062. operationsIface_raise_ev(&statechart);
  1063. sc_timer_service_proceed_cycles(&timer_service, 1);
  1064. EXPECT_TRUE(operations_isStateActive(&statechart, Operations_main_region_C));
  1065. EXPECT_FALSE(unnamedInterfaceOperation1Mock->calledAtLeastOnce());
  1066. EXPECT_FALSE(unnamedInterfaceOperation2Mock->calledAtLeastOnce(4l));
  1067. EXPECT_FALSE(unnamedOperation3Mock->calledAtLeastOnce());
  1068. EXPECT_FALSE(unnamedOperation3aMock->calledAtLeastOnce(1.0));
  1069. EXPECT_FALSE(unnamedOperation4Mock->calledAtLeastOnce());
  1070. EXPECT_FALSE(unnamedOperation4aMock->calledAtLeastOnce(5l));
  1071. EXPECT_FALSE(unnamedOperation5Mock->calledAtLeastOnce());
  1072. EXPECT_FALSE(unnamedOperation5aMock->calledAtLeastOnce());
  1073. alwaysTrueMock->reset();
  1074. internalOperation1Mock->reset();
  1075. internalOperation2Mock->reset();
  1076. internalOperation3Mock->reset();
  1077. internalOperation3aMock->reset();
  1078. internalOperation4Mock->reset();
  1079. internalOperation4aMock->reset();
  1080. internalOperation5Mock->reset();
  1081. internalOperation5aMock->reset();
  1082. interface1InterfaceOperation1Mock->reset();
  1083. interface1InterfaceOperation2Mock->reset();
  1084. interface1InterfaceOperation3Mock->reset();
  1085. interface1InterfaceOperation3aMock->reset();
  1086. interface1InterfaceOperation4Mock->reset();
  1087. interface1InterfaceOperation4aMock->reset();
  1088. interface1InterfaceOperation5Mock->reset();
  1089. interface1InterfaceOperation5aMock->reset();
  1090. unnamedInterfaceOperation1Mock->reset();
  1091. unnamedInterfaceOperation2Mock->reset();
  1092. unnamedOperation3Mock->reset();
  1093. unnamedOperation3aMock->reset();
  1094. unnamedOperation4Mock->reset();
  1095. unnamedOperation4aMock->reset();
  1096. unnamedOperation5Mock->reset();
  1097. unnamedOperation5aMock->reset();
  1098. }
  1099. void operationsInternal_internalOperation1(const Operations* statechart){
  1100. internalOperation1Mock->internalOperation1();
  1101. }
  1102. sc_boolean operationsInternal_internalOperation2(const Operations* statechart, const sc_integer param1){
  1103. internalOperation2Mock->InternalOperation2(param1);
  1104. return false;
  1105. }
  1106. sc_real operationsInternal_internalOperation3(const Operations* statechart){
  1107. internalOperation3Mock->internalOperation3();
  1108. return 0.0d;
  1109. }
  1110. sc_real operationsInternal_internalOperation3a(const Operations* statechart, const sc_real param1){
  1111. internalOperation3aMock->internalOperation3a(param1);
  1112. return 0.0d;
  1113. }
  1114. sc_integer operationsInternal_internalOperation4(const Operations* statechart){
  1115. internalOperation4Mock->internalOperation4();
  1116. return 0;
  1117. }
  1118. sc_integer operationsInternal_internalOperation4a(const Operations* statechart, const sc_integer param1){
  1119. internalOperation4aMock->internalOperation4a(param1);
  1120. return 0;
  1121. }
  1122. sc_string operationsInternal_internalOperation5(const Operations* statechart){
  1123. internalOperation5Mock->internalOperation5();
  1124. return 0;
  1125. }
  1126. sc_string operationsInternal_internalOperation5a(const Operations* statechart, const sc_string param1){
  1127. internalOperation5aMock->internalOperation5a(param1);
  1128. return 0;
  1129. }
  1130. void operationsIfaceInterface1_interfaceOperation1(const Operations* statechart){
  1131. interface1InterfaceOperation1Mock->interfaceOperation1();
  1132. }
  1133. sc_boolean operationsIfaceInterface1_interfaceOperation2(const Operations* statechart, const sc_integer param1){
  1134. interface1InterfaceOperation2Mock->InterfaceOperation2(param1);
  1135. return false;
  1136. }
  1137. sc_real operationsIfaceInterface1_interfaceOperation3(const Operations* statechart){
  1138. interface1InterfaceOperation3Mock->interfaceOperation3();
  1139. return 0.0d;
  1140. }
  1141. sc_real operationsIfaceInterface1_interfaceOperation3a(const Operations* statechart, const sc_real param1){
  1142. interface1InterfaceOperation3aMock->interfaceOperation3a(param1);
  1143. return 0.0d;
  1144. }
  1145. sc_integer operationsIfaceInterface1_interfaceOperation4(const Operations* statechart){
  1146. interface1InterfaceOperation4Mock->interfaceOperation4();
  1147. return 0;
  1148. }
  1149. sc_integer operationsIfaceInterface1_interfaceOperation4a(const Operations* statechart, const sc_integer param1){
  1150. interface1InterfaceOperation4aMock->interfaceOperation4a(param1);
  1151. return 0;
  1152. }
  1153. sc_string operationsIfaceInterface1_interfaceOperation5(const Operations* statechart){
  1154. interface1InterfaceOperation5Mock->interfaceOperation5();
  1155. return 0;
  1156. }
  1157. sc_string operationsIfaceInterface1_interfaceOperation5a(const Operations* statechart, const sc_string param1){
  1158. interface1InterfaceOperation5aMock->interfaceOperation5a(param1);
  1159. return 0;
  1160. }
  1161. void operationsIface_unnamedInterfaceOperation1(const Operations* statechart){
  1162. unnamedInterfaceOperation1Mock->unnamedInterfaceOperation1();
  1163. }
  1164. sc_boolean operationsIface_unnamedInterfaceOperation2(const Operations* statechart, const sc_integer param1){
  1165. unnamedInterfaceOperation2Mock->UnnamedInterfaceOperation2(param1);
  1166. return false;
  1167. }
  1168. sc_real operationsIface_unnamedOperation3(const Operations* statechart){
  1169. unnamedOperation3Mock->unnamedOperation3();
  1170. return 0.0d;
  1171. }
  1172. sc_real operationsIface_unnamedOperation3a(const Operations* statechart, const sc_real param1){
  1173. unnamedOperation3aMock->unnamedOperation3a(param1);
  1174. return 0.0d;
  1175. }
  1176. sc_integer operationsIface_unnamedOperation4(const Operations* statechart){
  1177. unnamedOperation4Mock->unnamedOperation4();
  1178. return 0;
  1179. }
  1180. sc_integer operationsIface_unnamedOperation4a(const Operations* statechart, const sc_integer param1){
  1181. unnamedOperation4aMock->unnamedOperation4a(param1);
  1182. return 0;
  1183. }
  1184. sc_string operationsIface_unnamedOperation5(const Operations* statechart){
  1185. unnamedOperation5Mock->unnamedOperation5();
  1186. return 0;
  1187. }
  1188. sc_string operationsIface_unnamedOperation5a(const Operations* statechart, const sc_string param1){
  1189. unnamedOperation5aMock->unnamedOperation5a(param1);
  1190. return 0;
  1191. }
  1192. sc_boolean operationsIface_alwaysTrue(const Operations* statechart){
  1193. return (alwaysTrueMock->*(alwaysTrueMock->getBehavior()))();
  1194. }