Skip to content

Generify Naggum.Assembler tests #37

Open
@ForNeVeR

Description

@ForNeVeR

Currently there are handwritten tests such as the folliwing:

[<Fact>]
let ``Hello world program should be executed`` () =
    let source = "(.assembly Hello
  (.method Main () System.Void (.entrypoint)
    (ldstr \"Hello, world!\")
    (call (mscorlib System.Console WriteLine (System.String) System.Void))
    (ret)))
"
    let output = execute source
    Assert.Equal ("Hello, world!\n", output)

We should make the test process more generic (as Naggum.Compiler testing already done): it should read all *.nga files from the test directory, compile them, then execute and verify its outputs and/or return codes against some expected values.

Maybe we could even set up the common infrastructure for both Naggum.Assembler and Naggum.Compiler testing (and detect compiler type by file extension).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions