Skip to content

[#1740] Add extended comparator functions to the `Test` module + show errors on wrong test primitive usages

Leonid Vasilev requested to merge dk318/#1740-fix-test-mode-equality-in-lsp into dev

Motivation and Context

This MR adds comparators to the Test module that could be used to compare lists, maps, sets, etc types.

Also, now we handle errors for wrong test primitives usage in entrypoint's code since they're not supported there.

Related issues

Resolves #1740 (closed) .

Checklist for the LIGO Language Server

  • I checked whether I need to update the file for the plugin and did so if necessary:
    • If I implemented a new LSP request, I added it to the list of supported features that may be disabled
    • If I implemented a new LSP method, I added it to the list of supported functionality
  • I checked that my changes work in Emacs, Vim, and Visual Studio Code
  • (Before merging) The commit history is squashed and prettified, and follows the Serokell commit policy, or the MR is set to squash the commits



  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)


Added extended comparators to the Test module. They could be used to compare values that couldn't be compared via regular = (e.g. lists and big maps).

Handle wrong test primitives usage in the LSP. Now you can see an error at the beginning of your file.


  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Leonid Vasilev

Merge request reports