Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
22db1fd9
Unverified
Commit
22db1fd9
authored
Jan 24, 2019
by
yann300
Committed by
GitHub
Jan 24, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1112 from ethereum/userdocSender
improve userdoc for sender account
parents
add4c572
34058dbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
testRunner.js
remix-tests/src/testRunner.js
+3
-1
sender_test.sol
remix-tests/tests/various_sender/sender_test.sol
+7
-7
No files found.
remix-tests/src/testRunner.js
View file @
22db1fd9
...
@@ -13,7 +13,9 @@ function getFunctionFullName (signature, methodIdentifiers) {
...
@@ -13,7 +13,9 @@ function getFunctionFullName (signature, methodIdentifiers) {
function
getOverridedSender
(
userdoc
,
signature
,
methodIdentifiers
)
{
function
getOverridedSender
(
userdoc
,
signature
,
methodIdentifiers
)
{
let
fullName
=
getFunctionFullName
(
signature
,
methodIdentifiers
)
let
fullName
=
getFunctionFullName
(
signature
,
methodIdentifiers
)
return
fullName
&&
userdoc
.
methods
[
fullName
]
?
userdoc
.
methods
[
fullName
].
notice
:
null
let
match
=
/sender: account-+
(\d)
/g
let
accountIndex
=
userdoc
.
methods
[
fullName
]
?
match
.
exec
(
userdoc
.
methods
[
fullName
].
notice
)
:
null
return
fullName
&&
accountIndex
?
accountIndex
[
1
]
:
null
}
}
function
getAvailableFunctions
(
jsonInterface
)
{
function
getAvailableFunctions
(
jsonInterface
)
{
...
...
remix-tests/tests/various_sender/sender_test.sol
View file @
22db1fd9
...
@@ -2,25 +2,25 @@ import "remix_tests.sol"; // this import is automatically injected by Remix.
...
@@ -2,25 +2,25 @@ import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
import "remix_accounts.sol";
contract SenderTest {
contract SenderTest {
function beforeAll () public {}
function beforeAll () public {}
/// 1
///
sender: account-
1
function checkSenderIs1 () public {
function checkSenderIs1 () public {
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIs1");
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIs1");
}
}
/// 0
///
sender: account-
0
function checkSenderIs0 () public {
function checkSenderIs0 () public {
Assert.equal(msg.sender, TestsAccounts.getAccount(0), "wrong sender in checkSenderIs0");
Assert.equal(msg.sender, TestsAccounts.getAccount(0), "wrong sender in checkSenderIs0");
}
}
/// 1
///
sender: account-
1
function checkSenderIsNt0 () public {
function checkSenderIsNt0 () public {
Assert.notEqual(msg.sender, TestsAccounts.getAccount(0), "wrong sender in checkSenderIsNot0");
Assert.notEqual(msg.sender, TestsAccounts.getAccount(0), "wrong sender in checkSenderIsNot0");
}
}
/// 2
///
sender: account-
2
function checkSenderIsnt2 () public {
function checkSenderIsnt2 () public {
Assert.notEqual(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIsnt2");
Assert.notEqual(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIsnt2");
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment