Skip to content

Testing Philosophy

Back to Testing Contracts

Overview

The test suite is organized in layers of increasing scope:

LayerWhat It TestsCountCommand
Unit testsIndividual compiler components (lexer, parser, semantic, IR, codegen, runtime)variescargo test --workspace
E2E compilationFull pipeline from Solidity source to NEF + manifest80 testscargo test --test e2e_compilation_tests
ConformanceOutput correctness against reference Neo implementations40 vectorscargo test --test conformance_tests
Strict compatibilityCompilation of all devpack and example contractsscript-definedmake test-compile-strict
Neo-Express smokeDeploy + invoke on a real local Neo chain16+ scriptsmake test-deploy-smoke-full
ToolingTypeScript packages (Hardhat, Foundry, ABI router)variesmake tooling-test
C# runtimeEVM-compatible runtime primitivesvariesmake runtime-test

Each layer catches different classes of bugs. Unit tests catch logic errors in individual passes. E2E tests catch integration issues between passes. Conformance tests catch behavioral divergence from Neo N3. Smoke tests catch deployment and invocation failures that only manifest on a real chain.

Quick Feedback Loop

During development, start with the smallest relevant Rust test or cargo test --workspace when the change touches shared compiler/runtime behavior. Exact runtime depends on the local machine and enabled features.

MIT Licensed