gpt4 book ai didi

unit-testing - 编写混音单元测试时出错 : URL not parseable: remix_accounts. sol

转载 作者:行者123 更新时间:2023-12-04 12:50:29 24 4
gpt4 key购买 nike

我正在 remix-ide 中编写单元测试,我想在单个测试中从不同地址调用函数。

remix-tests Github page说你可以使用 import "remix_accounts.sol"; ,但我得到 URL not parseable: remix_accounts.sol .如何解决?或者也许有另一种从不同地址调用的方法?

最佳答案

使用相对路径导入文件,在您的情况下,修改以下内容

import "remix_accounts.sol";


import "./remix_accounts.sol";

另外,请注意 remix 不允许从祖先目录导入,例如:
import "../remix_accounts.sol";

关于unit-testing - 编写混音单元测试时出错 : URL not parseable: remix_accounts. sol,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55635498/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com