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

Create Testengine executable #365

Closed
wants to merge 132 commits into from

Conversation

meevee98
Copy link

Created an executable for the TestEngine to allow other Neo compilers, even those that aren't written using C#, to run their tests with the same executing engine as the C# compiler.

@meevee98 meevee98 requested review from erikzhang and shargon October 8, 2020 19:10
@@ -8,7 +8,7 @@
[assembly: InternalsVisibleTo("Neo.SmartContract.Framework.UnitTests")]
namespace Neo.Compiler.MSIL.UnitTests.Utils
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change namespace?

}
else
{
result = BuildJsonException("One or more arguments are missing");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show an example?

var json = new JObject();

json["vm_state"] = testEngine.State.ToString();
json["gas_consumed"] = (new BigDecimal(testEngine.GasConsumed, NativeContract.GAS.Decimals)).ToString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed to use gasconsumed format in json properties

return json;
}

public static JObject ToJson(this DataCache<StorageKey, StorageItem> storage)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to initialize the storage, for fake balances for example.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently working on this


if (!success)
{
// if something went wrong while reading the json, inserts null in this argument position
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

show log or break the execution, it could produce test mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping

@meevee98 meevee98 force-pushed the test-engine-executable branch from 2b50f6e to ba806a1 Compare October 19, 2020 14:54
@meevee98 meevee98 force-pushed the test-engine-executable branch from 0d423f9 to 0c1303e Compare November 16, 2021 19:37
@devhawk
Copy link
Contributor

devhawk commented Nov 30, 2021

FYI, NGD Enterprise is working on a similar project that is integrated into the blockchain toolkit: https://github.com/ngdenterprise/neo-test/tree/devhawk/test-runner

Copy link
Contributor

@devhawk devhawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we continuing to make updates to this PR instead of https://github.com/ngdenterprise/neo-test/tree/main/src/runner

@meevee98 meevee98 force-pushed the test-engine-executable branch from fdc6141 to 81c6782 Compare December 9, 2022 20:35
@meevee98 meevee98 force-pushed the test-engine-executable branch from 81c6782 to c2ef0ae Compare December 9, 2022 20:52
@meevee98 meevee98 closed this Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants