From 1f18f6deb6ae4617fe69cc648756fb8ed8701b8d Mon Sep 17 00:00:00 2001 From: Butch Wesley Date: Sun, 8 Jul 2018 11:46:31 -0400 Subject: [PATCH] documentation --- CHANGES.md | 9 ++++++--- scenes/main.tscn | 9 +++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 8080c1cd..47573b61 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,11 +6,14 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## Fixes * Bug fix by __Xrayez__ to ensure that the command line tool always sets the return code properly. Before it was only setting it if Gut was configured to exit when done. +* Fixed an issue where the command line tool wasn't setting options correctly when the .gutconfig.json file was present. All options are now applied correctly based on order of precedence (default < gutconfig < cmd line). I also added the `-gpo` command line option to print out all option values from all sources and what value would be used when running Gut. This will make debugging theses issues easier later. ## Features -We have two new asserts thanks to __hbergren__. These asserts make it easier to assert if a value is within or outside of a +/- range of a value. These are especially useful when comparing floats that the engine insists aren't equal due to rounding errors. -* `assert_almost_eq(got, expected, error_interval, text='')` - Asserts that `got` is within the range of `expected` +/- `error_interval`. The upper and lower bounds are included in the check. Verified to work with integers, floats, and Vector2. Should work with anything that can be added/subtracted. Examples -* `assert_almost_ne(got, expected, error_interval, text='')` - This is the inverse of `assert_almost_eq`. This will pass if `got` is outside the range of `expected` +/- `error_interval`. Examples +* We have two new asserts thanks to __hbergren__. These asserts make it easier to assert if a value is within or outside of a +/- range of a value. These are especially useful when comparing floats that the engine insists aren't equal due to rounding errors. + * `assert_almost_eq(got, expected, error_interval, text='')` - Asserts that `got` is within the range of `expected` +/- `error_interval`. The upper and lower bounds are included in the check. Verified to work with integers, floats, and Vector2. Should work with anything that can be added/subtracted. Examples + * `assert_almost_ne(got, expected, error_interval, text='')` - This is the inverse of `assert_almost_eq`. This will pass if `got` is outside the range of `expected` +/- `error_interval`. Examples +* __Xrayez__ contributed a new option to maximize the Gut window upon launch. The option can be set in the editor, .gutconfig, or at the command line. +* Added the `-gpo` command line option to print out all option values from all sources and what value would be used when running Gut. This will make debugging option issues much easier. ## Other diff --git a/scenes/main.tscn b/scenes/main.tscn index 9f42fc5d..cbafcf43 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -5,12 +5,14 @@ [ext_resource path="res://addons/gut/icon.png" type="Texture" id=3] [node name="main" type="Node2D" index="0"] + script = ExtResource( 1 ) __meta__ = { "__editor_plugin_screen__": "Script" } [node name="Gut" type="WindowDialog" parent="." index="0"] + visible = false anchor_left = 0.0 anchor_top = 0.0 @@ -32,7 +34,7 @@ __meta__ = { "_editor_icon": ExtResource( 3 ) } _should_maximize = false -_run_on_load = false +_run_on_load = true _select_script = null _tests_like = null _inner_class_name = null @@ -47,12 +49,13 @@ _inner_class_prefix = "Test" _temp_directory = "user://gut_temp_directory" _directory1 = "res://test/unit" _directory2 = "res://test/integration" -_directory3 = "res://test/samples" +_directory3 = "" _directory4 = "" _directory5 = "" _directory6 = "" [node name="RunGutTestsButton" type="Button" parent="." index="1"] + anchor_left = 0.0 anchor_top = 0.0 anchor_right = 0.0 @@ -77,3 +80,5 @@ flat = false align = 1 [connection signal="pressed" from="RunGutTestsButton" to="." method="_on_RunGutTestsButton_pressed"] + +