mirror of
https://github.com/yeslayla/run-gut-tests-action.git
synced 2025-01-14 04:53:40 +01:00
Bad test proj
This commit is contained in:
parent
c272420f05
commit
7c34ae7ccc
@ -7,34 +7,6 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
rect_min_size = Vector2( 740, 250 )
|
||||
script = ExtResource( 1 )
|
||||
_font_name = "AnonymousPro"
|
||||
_font_size = 20
|
||||
_font_color = Color( 0.8, 0.8, 0.8, 1 )
|
||||
_background_color = Color( 0.15, 0.15, 0.15, 1 )
|
||||
_color_output = true
|
||||
_select_script = ""
|
||||
_tests_like = ""
|
||||
_inner_class_name = ""
|
||||
_run_on_load = true
|
||||
_should_maximize = false
|
||||
_should_print_to_console = true
|
||||
_show_orphans = true
|
||||
_log_level = 1
|
||||
_yield_between_tests = true
|
||||
_disable_strict_datatype_checks = false
|
||||
_test_prefix = "test_"
|
||||
_file_prefix = "test_"
|
||||
_file_extension = ".gd"
|
||||
_inner_class_prefix = "Test"
|
||||
_temp_directory = "user://gut_temp_directory"
|
||||
_export_path = ""
|
||||
_include_subdirectories = true
|
||||
_directory1 = "res://tests"
|
||||
_directory2 = ""
|
||||
_directory3 = ""
|
||||
_directory4 = ""
|
||||
_directory5 = ""
|
||||
_directory6 = ""
|
||||
_double_strategy = 1
|
||||
_pre_run_script = ""
|
||||
_post_run_script = ""
|
||||
|
24
test_proj/tests/test_error.gd
Normal file
24
test_proj/tests/test_error.gd
Normal file
@ -0,0 +1,24 @@
|
||||
extends 'res://addons/gut/test.gd'
|
||||
|
||||
var ObjToTest = load('res://obj_to_test.gd')
|
||||
|
||||
func test_this_is_ok():
|
||||
var o = ObjToTest.new()
|
||||
# We've decided it is ok for this method to return null here and that we do
|
||||
# not care about the script error.
|
||||
assert_null(o.is_param_the_number_1('a'))
|
||||
|
||||
func test_this_is_NOT_ok():
|
||||
var a = 'a'
|
||||
if(a == 1): # causes test to exit and our asserts are never called
|
||||
assert_eq(1,1)
|
||||
else:
|
||||
assert_eq(1,2)
|
||||
|
||||
func test_this_is_also_NOT_ok():
|
||||
assert_eq('1', '1') # this suppresses the warning since we did an assert
|
||||
var a = 'a'
|
||||
if(a == 1): # causes test to exit and our asserts are never called
|
||||
assert_eq(1,1)
|
||||
else:
|
||||
assert_eq(1,2)
|
Loading…
Reference in New Issue
Block a user