module

Microtest

Inherits Microtest::GlobalHookDSL

Constants

BACKTRACE_LINE_REGEX = {% if flag?(:msvc) %} /\A(?<file>.+):(?<line>\d+) in \'(?<func>\S+)\'\z/ {% else %} /\A(?<file>.+):(?<line>\d+):(?<column>\d+) in \'(?<func>\S+)\'\z/ {% end %}

e.g.: "spec/spec_helper.cr:64:1 in '__crystal_main'" (backtraces on MSVC do not have column numbers)

COMMON_REPORTERS = [ErrorListReporter.new, SlowTestsReporter.new, SummaryReporter.new] of Reporter
CRYSTAL_DIR = find_crystal_root_path
CYAN = RGB.new(0, 205, 205)
DARK_GRAY = RGB.new(100, 100, 100)
GREEN = RGB.new(0, 220, 0)
LIGHT_BLUE = RGB.new(90, 90, 250)
LIGHT_GRAY = RGB.new(200, 200, 200)
LIGHT_MAGENTA = RGB.new(220, 0, 220)
MAGENTA = RGB.new(205, 0, 205)
MEHTOD_SEPARATOR = "#"
PROJECT_DIR = Dir.current
PROJECT_LIB_DIR = File.join(PROJECT_DIR, "lib")
PROJECT_SPEC_DIR = File.join(PROJECT_DIR, "spec")
PROJECT_SRC_DIR = File.join(PROJECT_DIR, "src")
RED = RGB.new(220, 0, 0)
VERSION = {{ (`shards version /tmp/tmp.ObFIDM/src/src/microtest`).strip.stringify }}
WHITE = RGB.new(255, 255, 255)
YELLOW = RGB.new(220, 220, 0)

Class methods

bug(msg : String)
Source
fetch_seed
Source
find_crystal_root_path
Source
power_assert_formatter
Source
reporter_types(reporting : Symbol)
Source
run(reporters, random_seed = fetch_seed)
Source
run(reporting : Symbol = :progress, *args)
Source
run!(reporting : Symbol = :progress, *args)
Source
run!(*args)
Source

Nested types