Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Running tests generates a lot of warnings #10

Closed
Nedudi opened this issue Sep 16, 2017 · 4 comments
Closed

Running tests generates a lot of warnings #10

Nedudi opened this issue Sep 16, 2017 · 4 comments

Comments

@Nedudi
Copy link

Nedudi commented Sep 16, 2017

npm test

> [email protected] test /Users/dima/work/MultiSigWallet
> sh truffle_test_runner.sh

Compiling ./contracts/Factory.sol...
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/MultiSigWallet.sol...
Compiling ./contracts/MultiSigWalletFactory.sol...
Compiling ./contracts/MultiSigWalletWithDailyLimit.sol...
Compiling ./contracts/MultiSigWalletWithDailyLimitFactory.sol...
Compiling ./contracts/TestToken.sol...

Compilation warnings encountered:

/Users/dima/work/MultiSigWallet/contracts/Factory.sol:1:1: Warning: Source file does not specify required compiler version!Consider adding "pragma solidity ^0.4.14
contract Factory {
^
Spanning multiple lines.
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:48:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:54:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:60:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:66:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:72:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:78:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:84:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:90:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:99:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:123:17: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
                throw;
                ^---^
,/Users/dima/work/MultiSigWallet/contracts/TestToken.sol:49:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/TestToken.sol:67:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:241:13: Warning: This declaration shadows a builtin symbol.
            Transaction tx = transactions[transactionId];
            ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimit.sol:53:9: Warning: This declaration shadows a builtin symbol.
        Transaction tx = transactions[transactionId];
        ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:241:13: Warning: Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
            Transaction tx = transactions[transactionId];
            ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimit.sol:53:9: Warning: Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
        Transaction tx = transactions[transactionId];
        ^------------^


/Users/dima/work/MultiSigWallet/contracts/Factory.sol:1:1: Warning: Source file does not specify required compiler version!Consider adding "pragma solidity ^0.4.14
contract Factory {
^
Spanning multiple lines.
,/Users/dima/work/MultiSigWallet/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:48:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:54:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:60:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:66:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:72:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:78:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:84:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:90:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:99:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:123:17: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
                throw;
                ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletFactory.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimit.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimitFactory.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/TestToken.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
,/Users/dima/work/MultiSigWallet/contracts/TestToken.sol:49:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/TestToken.sol:67:13: Warning: "throw" is deprecated in favour of "revert()", "require()" and "assert()".
            throw;
            ^---^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:241:13: Warning: This declaration shadows a builtin symbol.
            Transaction tx = transactions[transactionId];
            ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimit.sol:53:9: Warning: This declaration shadows a builtin symbol.
        Transaction tx = transactions[transactionId];
        ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:241:13: Warning: Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
            Transaction tx = transactions[transactionId];
            ^------------^
,/Users/dima/work/MultiSigWallet/contracts/MultiSigWalletWithDailyLimit.sol:53:9: Warning: Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence this warning.
        Transaction tx = transactions[transactionId];
        ^------------^
Compiliation failed. See above.
truffle_test_runner.sh: line 3: run-with-testrpc: command not found
truffle_test_runner.sh: line 4: run-with-testrpc: command not found
truffle_test_runner.sh: line 5: run-with-testrpc: command not found

@ernaneluis
Copy link

I have the same problem.

@blackjack-8
Copy link

The warning doesn't have impact to the test. Seems like you haven't install testrpc yet.

@nicStuff
Copy link

nicStuff commented Oct 27, 2017

@roypun This

,/Users/dima/work/MultiSigWallet/contracts/MultiSigWallet.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.4.14+commit.c2215d46.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^

Isn't a warning. Furthermore, testrpc has nothing to do with the compilation phase.

@carchrae
Copy link
Contributor

i think the problem may be you haven't executed npm install - otherwise, it would find run-with-testrpc

(i speak from experience - i forgot this as well).

as to why it got so far, i think you have an old version of truffle installed globally. i really don't like installing global npm libraries for that reason. it finds your old version and it seems like it works, but really you should have a newer one if you ran npm install

Georgi87 added a commit that referenced this issue Dec 4, 2017
Eliminate warnings when running tests per issue #10
giacomolicari pushed a commit that referenced this issue Jan 24, 2018
Eliminate warnings when running tests per issue #10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants