|
@ -203,3 +203,47 @@ function test_vmDebugging() |
|
|
tryCompare(mainApplication.mainContent.rightPane.vmMemory.listModel, "length", 0); |
|
|
tryCompare(mainApplication.mainContent.rightPane.vmMemory.listModel, "length", 0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function test_ctrTypeAsParam() |
|
|
|
|
|
{ |
|
|
|
|
|
newProject(); |
|
|
|
|
|
editContract( |
|
|
|
|
|
"contract C1 {\r " + |
|
|
|
|
|
" function get() returns (uint256)\r " + |
|
|
|
|
|
" {\r " + |
|
|
|
|
|
" return 159;\r " + |
|
|
|
|
|
" }\r " + |
|
|
|
|
|
"}\r" + |
|
|
|
|
|
"contract C2 {\r " + |
|
|
|
|
|
" C1 c1;\r " + |
|
|
|
|
|
" function getFromC1() returns (uint256)\r " + |
|
|
|
|
|
" {\r " + |
|
|
|
|
|
" return c1.get();\r " + |
|
|
|
|
|
" }\r " + |
|
|
|
|
|
" function C2(C1 _c1)\r" + |
|
|
|
|
|
" {\r " + |
|
|
|
|
|
" c1 = _c1;\r" + |
|
|
|
|
|
" }\r " + |
|
|
|
|
|
"}"); |
|
|
|
|
|
mainApplication.projectModel.stateListModel.editState(0); //C1 ctor already added
|
|
|
|
|
|
mainApplication.projectModel.stateDialog.model.addTransaction(); |
|
|
|
|
|
var transactionDialog = mainApplication.projectModel.stateDialog.transactionDialog; |
|
|
|
|
|
ts.waitForRendering(transactionDialog, 3000); |
|
|
|
|
|
transactionDialog.selectContract("C2"); |
|
|
|
|
|
transactionDialog.selectFunction("C2"); |
|
|
|
|
|
transactionDialog.acceptAndClose(); |
|
|
|
|
|
mainApplication.projectModel.stateDialog.model.addTransaction(); |
|
|
|
|
|
transactionDialog = mainApplication.projectModel.stateDialog.transactionDialog; |
|
|
|
|
|
ts.waitForRendering(transactionDialog, 3000); |
|
|
|
|
|
transactionDialog.selectContract("C2"); |
|
|
|
|
|
transactionDialog.selectFunction("getFromC1"); |
|
|
|
|
|
clickElement(transactionDialog, 406, 340); |
|
|
|
|
|
clickElement(transactionDialog, 406, 366); |
|
|
|
|
|
transactionDialog.acceptAndClose(); |
|
|
|
|
|
mainApplication.projectModel.stateDialog.acceptAndClose(); |
|
|
|
|
|
mainApplication.mainContent.startQuickDebugging(); |
|
|
|
|
|
if (!ts.waitForSignal(mainApplication.clientModel, "debugDataReady(QObject*)", 5000)) |
|
|
|
|
|
fail("Error running transaction"); |
|
|
|
|
|
|
|
|
|
|
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel.get(4), "returned", "(159)"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|