mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-06 06:53:39 +00:00
Initial test framework
Clean up makefiles Everything buildable under docker (or natively)
This commit is contained in:
parent
5a0c70a017
commit
da7f70c456
48 changed files with 7254 additions and 293 deletions
23
test/unity/auto/yaml_helper.rb
Normal file
23
test/unity/auto/yaml_helper.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# =========================================================================
|
||||
# Unity - A Test Framework for C
|
||||
# ThrowTheSwitch.org
|
||||
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||
# SPDX-License-Identifier: MIT
|
||||
# =========================================================================
|
||||
|
||||
require 'yaml'
|
||||
|
||||
module YamlHelper
|
||||
def self.load(body)
|
||||
if YAML.respond_to?(:unsafe_load)
|
||||
YAML.unsafe_load(body)
|
||||
else
|
||||
YAML.load(body)
|
||||
end
|
||||
end
|
||||
|
||||
def self.load_file(file)
|
||||
body = File.read(file)
|
||||
self.load(body)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue