Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Testing library methods causing Deployment failure #329

Open
IstoraMandiri opened this issue Oct 13, 2016 · 1 comment
Open

Testing library methods causing Deployment failure #329

IstoraMandiri opened this issue Oct 13, 2016 · 1 comment

Comments

@IstoraMandiri
Copy link

Trying out testing in dapple, and it works great with contracts but when I try to test library methods, it's causing some odd behaviour. I can import the library and run tests fine, but if the test calls a method on the imported library, it causes Deployment failure.

I'm using dapple@0.8.8, with the following test:

import 'dapple/test.sol'; // virtual "dapple" package imported when `dapple test` is run
import './MathLib.sol';

contract MyMathTest is Test {

    function testMyLib(){
      bool resultIsSafe = MathLib.returnsTrue();
      assertEq( resultIsSafe, false );
    }
@IstoraMandiri IstoraMandiri changed the title Testing library methods casuses Deployment failure Testing library methods causing Deployment failure Oct 13, 2016
@mhhf
Copy link
Member

mhhf commented Oct 16, 2016

I'm currently working on this. Unfortunately there won't be a quick solution soon since we have to solve #290 and #312 before. However, we have a wip working solution for a simple use case which i can turn on immediately for public use: The simple use case is if contracts depend on Libraries. No name collision resolution is done, also libraries depending on other libraries are not supported as well. Note that this would just work for testing, not for real environments with deployment scripts.

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

2 participants