Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generify Naggum.Assembler tests #37

Open
ForNeVeR opened this issue Dec 27, 2015 · 0 comments
Open

Generify Naggum.Assembler tests #37

ForNeVeR opened this issue Dec 27, 2015 · 0 comments

Comments

@ForNeVeR
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant