Skip to content

feat(compilers): allow pure Yul tests in forge test #11059

@iajoiner

Description

@iajoiner

Component

Forge

Describe the feature you would like

src/MathUtil.yul

function min(a, b) -> minimum { minimum := a if lt(b, a) { minimum := b } }

test/MathUtil.t.yul

import "../src/MathUtil.yul" import "forge-std/Test.yul" // Doesn't exist yet but we can add this function test_min() { assert_eq(2, min(4, 2)) }

forge test --strict-assembly should be able to run this

Additional context

I'm working on a Yul project. Since there is no Yul test right now we have to package every Yul function we actually use into Solidity and use a preprocessing script to handle Yul imports from a different file. We really shouldn't have to do this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions