Skip to content

VUT is a lightweight framework for rule validation and unit testing in Vlang. Simplify code correctness checks, data validation, and unit testing in your V projects with this efficient tool.

License

siguici/vut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validation and Unit Testing Framework for Vlang

VUT is a minimalistic framework for validating rules and conducting unit tests in Vlang. Simplify code validation and ensure component correctness effortlessly.

Installation

  • Install VUT using VPM (recommanded):
v install siguici.vut
  • Install VUT using Git:
mkdir ${V_MODULES:-$HOME/.vmodules}/siguici
git  clone --depth=1 https://github.com/siguici/vut ${V_MODULES:-$HOME/.vmodules}/siguici/vut
  • Use VUT as a project dependency:
Module {
    //...
	dependencies: [
        'siguici.vut'
        //...
    ]
}

Usage

Filtering

import vut { filter }

assert filter(true).is_bool()
assert filter(true).is_true()
assert filter(2).is_any_int()
assert filter(5.4).is_any_float()
assert filter(8).is_num() // any_int or any_float

Assurance

import vut { ensure }

t := true

ensure(t).is_bool().is_true()

Expectation

import vut { expect }

t := true

expect(t).to_be_bool().to_be_true()

About

VUT is a lightweight framework for rule validation and unit testing in Vlang. Simplify code correctness checks, data validation, and unit testing in your V projects with this efficient tool.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages