subtly
10 years ago
70 changed files with 1133 additions and 312 deletions
@ -0,0 +1,41 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file QBasicNodeDefinition.cpp
|
||||
|
* @author Yann yann@ethdev.com |
||||
|
* @date 2014 |
||||
|
*/ |
||||
|
|
||||
|
#include "QBasicNodeDefinition.h" |
||||
|
#include <libsolidity/AST.h> |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace mix |
||||
|
{ |
||||
|
|
||||
|
QBasicNodeDefinition::QBasicNodeDefinition(QObject* _parent, solidity::Declaration const* _d): |
||||
|
QObject(_parent), m_name(QString::fromStdString(_d->getName())) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
QBasicNodeDefinition::QBasicNodeDefinition(QObject* _parent, std::string const& _name): |
||||
|
QObject(_parent), m_name(QString::fromStdString(_name)) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file QVariableDefinition.cpp
|
||||
|
* @author Yann yann@ethdev.com |
||||
|
* @date 2014 |
||||
|
*/ |
||||
|
|
||||
|
#include "QVariableDefinition.h" |
||||
|
#include <libdevcore/CommonJS.h> |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace mix |
||||
|
{ |
||||
|
|
||||
|
QString QVariableDefinition::encodeValueAsString() |
||||
|
{ |
||||
|
return QString::fromStdString(dev::toHex(encodeValue())); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
@ -1,8 +0,0 @@ |
|||||
singleton Style 1.0 Style.qml |
|
||||
singleton StateDialogStyle 1.0 StateDialogStyle.qml |
|
||||
singleton ProjectFilesStyle 1.0 ProjectFilesStyle.qml |
|
||||
singleton DebuggerPaneStyle 1.0 DebuggerPaneStyle.qml |
|
||||
singleton StateStyle 1.0 StateStyle.qml |
|
||||
singleton StatusPaneStyle 1.0 StatusPaneStyle.qml |
|
||||
singleton WebPreviewStyle 1.0 WebPreviewStyle.qml |
|
||||
singleton LogsPaneStyle 1.0 LogsPaneStyle.qml |
|
@ -0,0 +1,6 @@ |
|||||
|
<RCC> |
||||
|
<qresource prefix="/"> |
||||
|
<file>test/TestMain.qml</file> |
||||
|
<file>test/TestTransactionDebug.qml</file> |
||||
|
</qresource> |
||||
|
</RCC> |
@ -0,0 +1,50 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file main.cpp
|
||||
|
* @author Yann yann@ethdev.com |
||||
|
* @date 2014 |
||||
|
* Ethereum IDE client. |
||||
|
*/ |
||||
|
|
||||
|
#include <iostream> |
||||
|
#include <stdlib.h> |
||||
|
#include <quicktest.h> |
||||
|
#include <QtQml> |
||||
|
#include "MixApplication.h" |
||||
|
#include "Exceptions.h" |
||||
|
#include "TestService.h" |
||||
|
|
||||
|
using namespace dev::mix; |
||||
|
|
||||
|
int main(int _argc, char* _argv[]) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
MixApplication::initialize(); |
||||
|
qmlRegisterType<TestService>("org.ethereum.qml.TestService", 1, 0, "TestService"); |
||||
|
|
||||
|
return quick_test_main(_argc, _argv, "mix", _argv[1]); |
||||
|
} |
||||
|
catch (boost::exception const& _e) |
||||
|
{ |
||||
|
std::cerr << boost::diagnostic_information(_e); |
||||
|
} |
||||
|
catch (std::exception const& _e) |
||||
|
{ |
||||
|
std::cerr << _e.what(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,194 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file TestService.cpp
|
||||
|
* @author Arkadiy Paronyan arkadiy@ethdev.com |
||||
|
* @date 2015 |
||||
|
* Ethereum IDE client. |
||||
|
*/ |
||||
|
|
||||
|
#include "TestService.h" |
||||
|
#include <QtTest/QSignalSpy> |
||||
|
#include <QElapsedTimer> |
||||
|
#include <QQuickItem> |
||||
|
#include <QQuickWindow> |
||||
|
#include <QtTest/QTest> |
||||
|
#include <QtTest/qtestkeyboard.h> |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace mix |
||||
|
{ |
||||
|
|
||||
|
enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDoubleClick, MouseMove }; |
||||
|
|
||||
|
static void mouseEvent(MouseAction _action, QWindow* _window, QObject* _item, Qt::MouseButton _button, Qt::KeyboardModifiers _stateKey, QPointF _pos, int _delay = -1) |
||||
|
{ |
||||
|
if (_delay == -1 || _delay < 30) |
||||
|
_delay = 30; |
||||
|
if (_delay > 0) |
||||
|
QTest::qWait(_delay); |
||||
|
|
||||
|
if (_action == MouseClick) |
||||
|
{ |
||||
|
mouseEvent(MousePress, _window, _item, _button, _stateKey, _pos); |
||||
|
mouseEvent(MouseRelease, _window, _item, _button, _stateKey, _pos); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
QPoint pos = _pos.toPoint(); |
||||
|
QQuickItem* sgitem = qobject_cast<QQuickItem*>(_item); |
||||
|
if (sgitem) |
||||
|
pos = sgitem->mapToScene(_pos).toPoint(); |
||||
|
|
||||
|
_stateKey &= static_cast<unsigned int>(Qt::KeyboardModifierMask); |
||||
|
|
||||
|
QMouseEvent me(QEvent::User, QPoint(), Qt::LeftButton, _button, _stateKey); |
||||
|
switch (_action) |
||||
|
{ |
||||
|
case MousePress: |
||||
|
me = QMouseEvent(QEvent::MouseButtonPress, pos, _window->mapToGlobal(pos), _button, _button, _stateKey); |
||||
|
break; |
||||
|
case MouseRelease: |
||||
|
me = QMouseEvent(QEvent::MouseButtonRelease, pos, _window->mapToGlobal(pos), _button, 0, _stateKey); |
||||
|
break; |
||||
|
case MouseDoubleClick: |
||||
|
me = QMouseEvent(QEvent::MouseButtonDblClick, pos, _window->mapToGlobal(pos), _button, _button, _stateKey); |
||||
|
break; |
||||
|
case MouseMove: |
||||
|
// with move event the _button is NoButton, but 'buttons' holds the currently pressed buttons
|
||||
|
me = QMouseEvent(QEvent::MouseMove, pos, _window->mapToGlobal(pos), Qt::NoButton, _button, _stateKey); |
||||
|
break; |
||||
|
default: |
||||
|
break; |
||||
|
} |
||||
|
QSpontaneKeyEvent::setSpontaneous(&me); |
||||
|
if (!qApp->notify(_window, &me)) |
||||
|
{ |
||||
|
static const char* mouseActionNames[] = { "MousePress", "MouseRelease", "MouseClick", "MouseDoubleClick", "MouseMove" }; |
||||
|
QString warning = QString::fromLatin1("Mouse event \"%1\" not accepted by receiving window"); |
||||
|
QWARN(warning.arg(QString::fromLatin1(mouseActionNames[static_cast<int>(_action)])).toLatin1().data()); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
bool TestService::waitForSignal(QObject* _item, QString _signalName, int _timeout) |
||||
|
{ |
||||
|
QSignalSpy spy(_item, ("2" + _signalName.toStdString()).c_str()); |
||||
|
QMetaObject const* mo = _item->metaObject(); |
||||
|
|
||||
|
QStringList methods; |
||||
|
|
||||
|
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) |
||||
|
if (mo->method(i).methodType() == QMetaMethod::Signal) |
||||
|
methods << QString::fromLatin1(mo->method(i).methodSignature()); |
||||
|
|
||||
|
QElapsedTimer timer; |
||||
|
timer.start(); |
||||
|
|
||||
|
while (!spy.size()) |
||||
|
{ |
||||
|
int remaining = _timeout - int(timer.elapsed()); |
||||
|
if (remaining <= 0) |
||||
|
break; |
||||
|
QCoreApplication::processEvents(QEventLoop::AllEvents, remaining); |
||||
|
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); |
||||
|
QTest::qSleep(10); |
||||
|
} |
||||
|
|
||||
|
return spy.size(); |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyPress(QObject* _item, int _key, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyPress(window, Qt::Key(_key), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyRelease(QObject* _item, int _key, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyRelease(window, Qt::Key(_key), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyClick(QObject* _item, int _key, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyClick(window, Qt::Key(_key), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyPressChar(QObject* _item, QString const& _character, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyPress(window, _character[0].toLatin1(), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyReleaseChar(QObject* _item, QString const& _character, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyRelease(window, _character[0].toLatin1(), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::keyClickChar(QObject* _item, QString const& _character, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = eventWindow(_item); |
||||
|
QTest::keyClick(window, _character[0].toLatin1(), Qt::KeyboardModifiers(_modifiers), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
bool TestService::mouseClick(QObject* _item, qreal _x, qreal _y, int _button, int _modifiers, int _delay) |
||||
|
{ |
||||
|
QWindow* window = qobject_cast<QWindow*>(_item); |
||||
|
if (!window) |
||||
|
window = eventWindow(_item); |
||||
|
mouseEvent(MouseClick, window, _item, Qt::MouseButton(_button), Qt::KeyboardModifiers(_modifiers), QPointF(_x, _y), _delay); |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
void TestService::setTargetWindow(QObject* _window) |
||||
|
{ |
||||
|
QQuickWindow* window = qobject_cast<QQuickWindow*>(_window); |
||||
|
if (window) |
||||
|
m_targetWindow = window; |
||||
|
window->requestActivate(); |
||||
|
} |
||||
|
|
||||
|
QWindow* TestService::eventWindow(QObject* _item) |
||||
|
{ |
||||
|
QQuickItem* item = qobject_cast<QQuickItem*>(_item); |
||||
|
if (item && item->window()) |
||||
|
return item->window(); |
||||
|
|
||||
|
QQuickWindow* window = qobject_cast<QQuickWindow*>(_item); |
||||
|
if (!window) |
||||
|
window = qobject_cast<QQuickWindow*>(m_targetWindow); |
||||
|
if (window) |
||||
|
{ |
||||
|
window->requestActivate(); |
||||
|
return window; |
||||
|
} |
||||
|
item = qobject_cast<QQuickItem*>(m_targetWindow); |
||||
|
if (item) |
||||
|
return item->window(); |
||||
|
return 0; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
/*
|
||||
|
This file is part of cpp-ethereum. |
||||
|
|
||||
|
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
|
You should have received a copy of the GNU General Public License |
||||
|
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
/** @file TestService.h
|
||||
|
* @author Arkadiy Paronyan arkadiy@ethdev.com |
||||
|
* @date 2015 |
||||
|
* Ethereum IDE client. |
||||
|
*/ |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include <QObject> |
||||
|
|
||||
|
class QWindow; |
||||
|
|
||||
|
namespace dev |
||||
|
{ |
||||
|
namespace mix |
||||
|
{ |
||||
|
|
||||
|
class TestService: public QObject |
||||
|
{ |
||||
|
Q_OBJECT |
||||
|
Q_PROPERTY(QObject* targetWindow READ targetWindow WRITE setTargetWindow) |
||||
|
|
||||
|
public: |
||||
|
QObject* targetWindow() const { return m_targetWindow; } |
||||
|
void setTargetWindow(QObject* _window); |
||||
|
|
||||
|
public slots: |
||||
|
bool waitForSignal(QObject* _item, QString _signalName, int _timeout); |
||||
|
bool keyPress(QObject* _item, int _key, int _modifiers, int _delay); |
||||
|
bool keyRelease(QObject* _item, int _key, int _modifiers, int _delay); |
||||
|
bool keyClick(QObject* _item, int _key, int _modifiers, int _delay); |
||||
|
bool keyPressChar(QObject* _item, QString const& _character, int _modifiers, int _delay); |
||||
|
bool keyReleaseChar(QObject* _item, QString const& _character, int _modifiers, int _delay); |
||||
|
bool keyClickChar(QObject* _item, QString const& _character, int _modifiers, int _delay); |
||||
|
bool mouseClick(QObject* _item, qreal _x, qreal _y, int _button, int _modifiers, int _delay); |
||||
|
|
||||
|
private: |
||||
|
QWindow* eventWindow(QObject* _item); |
||||
|
QObject* m_targetWindow; |
||||
|
}; |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,142 @@ |
|||||
|
import QtQuick 2.2 |
||||
|
import QtTest 1.1 |
||||
|
import org.ethereum.qml.TestService 1.0 |
||||
|
import "../../qml" |
||||
|
|
||||
|
TestCase |
||||
|
{ |
||||
|
id: tc |
||||
|
TestService |
||||
|
{ |
||||
|
id: ts |
||||
|
targetWindow: mainApplication |
||||
|
function typeString(str, el) |
||||
|
{ |
||||
|
if (el === undefined) |
||||
|
el = mainApplication; |
||||
|
|
||||
|
for (var c in str) |
||||
|
{ |
||||
|
ts.keyPressChar(el, str[c], Qt.NoModifier, 0); |
||||
|
ts.keyReleaseChar(el, str[c], Qt.NoModifier, 0); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
function newProject() |
||||
|
{ |
||||
|
waitForRendering(mainApplication.mainContent, 10000); |
||||
|
mainApplication.projectModel.createProject(); |
||||
|
var projectDlg = mainApplication.projectModel.newProjectDialog; |
||||
|
wait(30); |
||||
|
projectDlg.projectTitle = "TestProject"; |
||||
|
projectDlg.pathFieldText = "/tmp/MixTest"; //TODO: get platform temp path |
||||
|
projectDlg.acceptAndClose(); |
||||
|
wait(30); |
||||
|
} |
||||
|
|
||||
|
function editContract(c) |
||||
|
{ |
||||
|
mainApplication.mainContent.codeEditor.getEditor("contract.sol").setText(c); |
||||
|
ts.keyPressChar(mainApplication, "S", Qt.ControlModifier, 200); //Ctrl+S |
||||
|
if (!ts.waitForSignal(mainApplication.codeModel, "compilationComplete()", 5000)) |
||||
|
fail("not compiled"); |
||||
|
} |
||||
|
|
||||
|
function clickElement(el, x, y) |
||||
|
{ |
||||
|
ts.mouseClick(el, x, y, Qt.LeftButton, Qt.NoModifier, 10) |
||||
|
} |
||||
|
|
||||
|
function test_defaultTransactionSequence() |
||||
|
{ |
||||
|
newProject(); |
||||
|
editContract( |
||||
|
"contract Contract {\r" + |
||||
|
" function Contract() {\r" + |
||||
|
" uint x = 69;\r" + |
||||
|
" uint y = 5;\r" + |
||||
|
" for (uint i = 0; i < y; ++i) {\r" + |
||||
|
" x += 42;\r" + |
||||
|
" z += x;\r" + |
||||
|
" }\r" + |
||||
|
" }\r" + |
||||
|
" uint z;\r" + |
||||
|
"}\r" |
||||
|
); |
||||
|
if (!ts.waitForSignal(mainApplication.clientModel, "runComplete()", 5000)) |
||||
|
fail("not run"); |
||||
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel, "count", 3); |
||||
|
} |
||||
|
|
||||
|
function test_transactionWithParameter() |
||||
|
{ |
||||
|
newProject(); |
||||
|
editContract( |
||||
|
"contract Contract {\r" + |
||||
|
" function setZ(uint256 x) {\r" + |
||||
|
" z = x;\r" + |
||||
|
" }\r" + |
||||
|
" function getZ() returns(uint256) {\r" + |
||||
|
" return z;\r" + |
||||
|
" }\r" + |
||||
|
" uint z;\r" + |
||||
|
"}\r" |
||||
|
); |
||||
|
mainApplication.projectModel.stateListModel.editState(0); |
||||
|
mainApplication.projectModel.stateDialog.model.addTransaction(); |
||||
|
var transactionDialog = mainApplication.projectModel.stateDialog.transactionDialog; |
||||
|
transactionDialog.selectFunction("setZ"); |
||||
|
clickElement(transactionDialog, 140, 300); |
||||
|
ts.typeString("442", transactionDialog); |
||||
|
transactionDialog.acceptAndClose(); |
||||
|
mainApplication.projectModel.stateDialog.model.addTransaction(); |
||||
|
transactionDialog.selectFunction("getZ"); |
||||
|
transactionDialog.acceptAndClose(); |
||||
|
mainApplication.projectModel.stateDialog.acceptAndClose(); |
||||
|
mainApplication.mainContent.startQuickDebugging(); |
||||
|
wait(1); |
||||
|
if (!ts.waitForSignal(mainApplication.clientModel, "runComplete()", 5000)) |
||||
|
fail("not run"); |
||||
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel, "count", 5); |
||||
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel.get(4), "returned", "(442)"); |
||||
|
} |
||||
|
|
||||
|
function test_constructorParameters() |
||||
|
{ |
||||
|
newProject(); |
||||
|
editContract( |
||||
|
"contract Contract {\r" + |
||||
|
" function Contract(uint256 x) {\r" + |
||||
|
" z = x;\r" + |
||||
|
" }\r" + |
||||
|
" function getZ() returns(uint256) {\r" + |
||||
|
" return z;\r" + |
||||
|
" }\r" + |
||||
|
" uint z;\r" + |
||||
|
"}\r" |
||||
|
); |
||||
|
mainApplication.projectModel.stateListModel.editState(0); |
||||
|
mainApplication.projectModel.stateDialog.model.editTransaction(2); |
||||
|
var transactionDialog = mainApplication.projectModel.stateDialog.transactionDialog; |
||||
|
clickElement(transactionDialog, 140, 300); |
||||
|
ts.typeString("442", transactionDialog); |
||||
|
transactionDialog.acceptAndClose(); |
||||
|
mainApplication.projectModel.stateDialog.model.addTransaction(); |
||||
|
transactionDialog.selectFunction("getZ"); |
||||
|
transactionDialog.acceptAndClose(); |
||||
|
mainApplication.projectModel.stateDialog.acceptAndClose(); |
||||
|
wait(1); |
||||
|
mainApplication.mainContent.startQuickDebugging(); |
||||
|
if (!ts.waitForSignal(mainApplication.clientModel, "runComplete()", 5000)) |
||||
|
fail("not run"); |
||||
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel, "count", 4); |
||||
|
tryCompare(mainApplication.mainContent.rightPane.transactionLog.transactionModel.get(3), "returned", "(442)"); |
||||
|
} |
||||
|
|
||||
|
Application |
||||
|
{ |
||||
|
id: mainApplication |
||||
|
} |
||||
|
} |
||||
|
|
@ -1,44 +1,44 @@ |
|||||
<RCC> |
<RCC> |
||||
<qresource prefix="/"> |
<qresource prefix="/"> |
||||
<file>qml/WebPreview.qml</file> |
<file>qml/WebCodeEditor.qml</file> |
||||
<file>qml/html/WebContainer.html</file> |
<file>qml/WebPreview.qml</file> |
||||
<file>qml/html/cm/active-line.js</file> |
<file>qml/html/WebContainer.html</file> |
||||
<file>qml/html/codeeditor.html</file> |
<file>qml/html/cm/acorn.js</file> |
||||
<file>qml/html/cm/codemirror.css</file> |
<file>qml/html/cm/acorn_loose.js</file> |
||||
<file>qml/html/cm/codemirror.js</file> |
<file>qml/html/cm/active-line.js</file> |
||||
<file>qml/html/cm/javascript.js</file> |
<file>qml/html/cm/anyword-hint.js</file> |
||||
<file>qml/html/cm/matchbrackets.js</file> |
<file>qml/html/cm/closebrackets.js</file> |
||||
<file alias="qml/CodeEditor.qml">qml/WebCodeEditor.qml</file> |
<file>qml/html/cm/codemirror.css</file> |
||||
<file>qml/html/codeeditor.js</file> |
<file>qml/html/cm/codemirror.js</file> |
||||
<file>qml/html/cm/fullscreen.css</file> |
<file>qml/html/cm/comment.js</file> |
||||
<file>qml/html/cm/fullscreen.js</file> |
<file>qml/html/cm/css.js</file> |
||||
<file>qml/html/cm/solarized.css</file> |
<file>qml/html/cm/def.js</file> |
||||
<file>qml/html/cm/xml.js</file> |
<file>qml/html/cm/dialog.css</file> |
||||
<file>qml/html/cm/htmlmixed.js</file> |
<file>qml/html/cm/dialog.js</file> |
||||
<file>qml/html/cm/css.js</file> |
<file>qml/html/cm/doc_comment.js</file> |
||||
<file>qml/html/cm/solidity.js</file> |
<file>qml/html/cm/ecma5spec.js</file> |
||||
<file>qml/html/cm/dialog.css</file> |
<file>qml/html/cm/errorannotation.js</file> |
||||
<file>qml/html/cm/dialog.js</file> |
<file>qml/html/cm/fullscreen.css</file> |
||||
<file>qml/html/cm/search.js</file> |
<file>qml/html/cm/fullscreen.js</file> |
||||
<file>qml/html/cm/searchcursor.js</file> |
<file>qml/html/cm/htmlmixed.js</file> |
||||
<file>qml/html/cm/anyword-hint.js</file> |
<file>qml/html/cm/infer.js</file> |
||||
<file>qml/html/cm/show-hint.js</file> |
<file>qml/html/cm/javascript-hint.js</file> |
||||
<file>qml/html/cm/show-hint.css</file> |
<file>qml/html/cm/javascript.js</file> |
||||
<file>qml/html/cm/closebrackets.js</file> |
<file>qml/html/cm/mark-selection.js</file> |
||||
<file>qml/html/cm/solidityToken.js</file> |
<file>qml/html/cm/matchbrackets.js</file> |
||||
<file>qml/html/cm/javascript-hint.js</file> |
<file>qml/html/cm/search.js</file> |
||||
<file>qml/html/cm/errorannotation.js</file> |
<file>qml/html/cm/searchcursor.js</file> |
||||
<file>qml/html/cm/tern.js</file> |
<file>qml/html/cm/show-hint.css</file> |
||||
<file>qml/html/cm/ecma5spec.js</file> |
<file>qml/html/cm/show-hint.js</file> |
||||
<file>qml/html/cm/comment.js</file> |
<file>qml/html/cm/signal.js</file> |
||||
<file>qml/html/cm/def.js</file> |
<file>qml/html/cm/solarized.css</file> |
||||
<file>qml/html/cm/doc_comment.js</file> |
<file>qml/html/cm/solidity.js</file> |
||||
<file>qml/html/cm/infer.js</file> |
<file>qml/html/cm/solidityToken.js</file> |
||||
<file>qml/html/cm/signal.js</file> |
<file>qml/html/cm/tern.js</file> |
||||
<file>qml/html/cm/ternserver.js</file> |
<file>qml/html/cm/ternserver.js</file> |
||||
<file>qml/html/cm/acorn.js</file> |
<file>qml/html/cm/walk.js</file> |
||||
<file>qml/html/cm/acorn_loose.js</file> |
<file>qml/html/cm/xml.js</file> |
||||
<file>qml/html/cm/walk.js</file> |
<file>qml/html/codeeditor.html</file> |
||||
<file>qml/html/cm/mark-selection.js</file> |
<file>qml/html/codeeditor.js</file> |
||||
</qresource> |
</qresource> |
||||
</RCC> |
</RCC> |
||||
|
Loading…
Reference in new issue