Skip to content

Antigen produces non-deterministic outputs causing false negatives #12

Open
@tannergooding

Description

@tannergooding

Antigen will occasionally produce code similar to:

public static int Main(string[] args)
{
    return Antigen();
}

public static int Antigen()
{
    new TestClass().Method0();
    return string.Join(Environment.NewLine, toPrint).GetHashCode();
}

This then causes the following failure:

Debug: -413924943

Release: 533722869




GH title text:
OutputMismatch

This code will always fail because string.GetHashCode() is non-deterministic across runs, it is only deterministic within the context of a single run. It would be better if this were to print and compare the contents of toPrint instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions