mirror of
https://github.com/sbrow/thor.git
synced 2026-10-25 02:01:56 -04:00
test: removed nil_logger from tests.
Tests always pass with it.
This commit is contained in:
@@ -100,7 +100,6 @@ test_menus_nil_input :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_menus_invalid_type :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
arena: mem.Dynamic_Arena
|
||||
mem.dynamic_arena_init(&arena)
|
||||
defer mem.dynamic_arena_destroy(&arena)
|
||||
@@ -113,7 +112,6 @@ test_menus_invalid_type :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_menus_array_non_string :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
arena: mem.Dynamic_Arena
|
||||
mem.dynamic_arena_init(&arena)
|
||||
defer mem.dynamic_arena_destroy(&arena)
|
||||
@@ -130,7 +128,6 @@ test_menus_array_non_string :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_menus_object_non_object_value :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
arena: mem.Dynamic_Arena
|
||||
mem.dynamic_arena_init(&arena)
|
||||
defer mem.dynamic_arena_destroy(&arena)
|
||||
@@ -146,7 +143,6 @@ test_menus_object_non_object_value :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_menus_non_numeric_weight :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
arena: mem.Dynamic_Arena
|
||||
mem.dynamic_arena_init(&arena)
|
||||
defer mem.dynamic_arena_destroy(&arena)
|
||||
@@ -161,7 +157,6 @@ test_menus_non_numeric_weight :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_menus_empty_title :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
arena: mem.Dynamic_Arena
|
||||
mem.dynamic_arena_init(&arena)
|
||||
defer mem.dynamic_arena_destroy(&arena)
|
||||
|
||||
@@ -3,6 +3,7 @@ package mustache
|
||||
|
||||
import "core:encoding/json"
|
||||
import "core:fmt"
|
||||
import "core:log"
|
||||
import "core:os"
|
||||
import "core:path/filepath"
|
||||
import "core:strings"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#+test
|
||||
package mustache
|
||||
|
||||
import "core:log"
|
||||
import "core:mem"
|
||||
import "core:strings"
|
||||
import "core:testing"
|
||||
@@ -130,8 +129,6 @@ leak_repeated_render :: proc(t: ^testing.T) {
|
||||
// The depth warning must be non-fatal: rendering still succeeds.
|
||||
@(test)
|
||||
test_context_depth_warns :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
AMT :: MAX_CONTEXT_DEPTH + 2
|
||||
|
||||
// Build AMT nested {x: {...}} levels; the innermost holds `leaf`.
|
||||
|
||||
@@ -3,7 +3,6 @@ package mustache
|
||||
|
||||
import "core:encoding/json"
|
||||
import "core:fmt"
|
||||
import "core:log"
|
||||
import "core:os"
|
||||
import "core:path/filepath"
|
||||
import "core:testing"
|
||||
@@ -55,10 +54,6 @@ run_one_test :: proc(
|
||||
test: json.Object,
|
||||
name, template_src, expected: string,
|
||||
) -> bool {
|
||||
// Spec tests deliberately exercise missing keys, missing partials, etc.
|
||||
// Silence the warnings to keep test output readable.
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
partials := make_map(map[string]Template, context.temp_allocator)
|
||||
|
||||
if "partials" in test {
|
||||
|
||||
@@ -5,7 +5,6 @@ package main
|
||||
import "core:encoding/json"
|
||||
import "core:flags"
|
||||
import "core:fmt"
|
||||
import "core:log"
|
||||
import "core:os"
|
||||
import "core:testing"
|
||||
import "core:time/datetime"
|
||||
@@ -84,7 +83,6 @@ test_load_config_file_invalid_json :: proc(t: ^testing.T) {
|
||||
cfg: Config_File
|
||||
ok := false
|
||||
{
|
||||
context.logger = log.nil_logger()
|
||||
ok = load_config_file(&cfg, path, context.temp_allocator)
|
||||
}
|
||||
testing.expect(t, !ok)
|
||||
@@ -106,7 +104,6 @@ test_load_config_file_partial :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_defaults_no_config :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
site: Site
|
||||
_flags: Flags
|
||||
@@ -126,7 +123,6 @@ test_init_site_defaults_no_config :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_config_dir_relative :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
site: Site
|
||||
_flags: Flags
|
||||
@@ -142,7 +138,6 @@ test_init_site_config_dir_relative :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_flag_overrides_default :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
site: Site
|
||||
_flags: Flags
|
||||
@@ -156,7 +151,6 @@ test_init_site_flag_overrides_default :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_full_pipeline :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
path := write_temp_config(
|
||||
"pipeline",
|
||||
@@ -178,7 +172,6 @@ test_init_site_full_pipeline :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_md_enable_disable :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
site: Site
|
||||
_flags: Flags
|
||||
@@ -199,7 +192,6 @@ test_init_site_md_enable_disable :: proc(t: ^testing.T) {
|
||||
|
||||
@(test)
|
||||
test_init_site_config_paths :: proc(t: ^testing.T) {
|
||||
context.logger = log.nil_logger()
|
||||
|
||||
path := write_temp_config(
|
||||
"paths",
|
||||
|
||||
Reference in New Issue
Block a user