// `@test import` brings a module in for tests only (ADR 0064): a `@test` // function may use it, any other item is E0126, and a program build drops // it with the tests. No other attribute applies to an import (E0114), nor // does `@test native`: an import has nothing to run. @test import std/list @test import std/option.{unwrap_or} @should_panic "no" //~ ERROR E0114 `@should_panic` does not apply to an import import std/result @test native import std/string //~ ERROR E0114 `@test native` does not apply to an import @test fn a_test_may_use_both :: { let _ = list.length [1, 2] let _ = unwrap_or None 1 let _ = result.is_ok (Ok(1)) let _ = string.length "ok" () } fn qualified :: -> Int //~^ ERROR E0126 `qualified` is not a test but uses `std/list` { list.length [1, 2] } fn by_name :: -> Int //~^ ERROR E0126 `by_name` is not a test but uses `std/option` { unwrap_or None 1 } fn twice :: -> Int //~^ ERROR E0126 `twice` is not a test but uses `std/list` { list.length [1] + list.length [2] }