Skip to content

Commit

Permalink
[move] Migrate most move-ir-compiler unit_tests
Browse files Browse the repository at this point in the history
This commit migrates most of the move-ir-compiler unit_tests, from Rust
unit tests (which use Rust strings to represent Move IR programs), to the
transactional test runner.

Two sets of tests remain as Rust unit tests:

1. Tests of the VM control flow graph. As far as I can tell, these
   should either be moved out of the move-ir-compiler test suite, or they
   require a transactional test runner that can verify the control-flow
   graph of a Move program, or they should be deleted. In any case, I'll
   do this in a separate commit.
2. Tests that use Rust to programmatically generate hundreds of functions
   and locals. Maybe these out to remain as Rust unit tests.

All tests other than these 2 kinds have been migrated to the
transactional test runner. In doing so, I also categorized and
documented the tests.

1. Tests of whether some text can be parsed as Move IR have been moved
   to a `parsing` directory.
2. Tests of whether bytecode can be generated from some parsed Move IR
   have been moved to a `bytecode-generation` directory.
3. Tests of the specification language have been moved to a
   `specification` directory.

Within each of these categories, tests of the same concept across several
files have been combined into a single file. For example, all tests of how
comments are parsed are now in `parsing/comments.mvir`.

Closes: #10055
  • Loading branch information
modocache authored and bors-libra committed Dec 17, 2021
1 parent c843209 commit af68c84
Show file tree
Hide file tree
Showing 89 changed files with 1,608 additions and 1,428 deletions.
369 changes: 0 additions & 369 deletions language/move-ir-compiler/src/unit_tests/branch_tests.rs

This file was deleted.

Loading

0 comments on commit af68c84

Please sign in to comment.