-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff696ae
commit c951296
Showing
3 changed files
with
86 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// SPDX-License-Identifier: Unlicense | ||
pragma solidity ^0.8.15; | ||
|
||
import "foundry-huff/HuffDeployer.sol"; | ||
import "forge-std/Test.sol"; | ||
import "forge-std/console.sol"; | ||
|
||
contract ComplexTest is Test { | ||
Complex public complex; | ||
|
||
function setUp() public { | ||
address com = HuffDeployer.deploy("Wrapper"); | ||
complex = Complex(com); | ||
} | ||
|
||
function testAddZ() public { | ||
(int256 r, int256 i) = complex.addZ(1, 2, 3, 4); | ||
assertEq(r, 3); | ||
assertEq(i, 7); | ||
} | ||
} | ||
|
||
interface Complex { | ||
function addZ( | ||
int256, | ||
int256, | ||
int256, | ||
int256 | ||
) external returns (int256, int256); | ||
|
||
function subZ( | ||
int256, | ||
int256, | ||
int256, | ||
int256 | ||
) external returns (int256, int256); | ||
|
||
function mulZ( | ||
int256, | ||
int256, | ||
int256, | ||
int256 | ||
) external returns (int256, int256); | ||
|
||
function divZ( | ||
int256, | ||
int256, | ||
int256, | ||
int256 | ||
) external returns (int256, int256); | ||
|
||
function calcR( | ||
int256, | ||
int256, | ||
int256, | ||
int256 | ||
) external returns (int256, int256); | ||
|
||
function toPolar(int256, int256) external returns (int256, int256); | ||
|
||
function fromPolar(int256, int256) external returns (int256, int256); | ||
|
||
function p_atan2(int256, int256) external returns (int256); | ||
|
||
function atan1to1(int256) external returns (int256); | ||
|
||
function ln(int256, int256) external returns (int256); | ||
|
||
function sqrt(int256, int256) external returns (int256); | ||
|
||
function expZ(int256, int256) external returns (int256, int256); | ||
|
||
function pow(int256, int256, int256) external returns (int256, int256); | ||
} |
This file was deleted.
Oops, something went wrong.