From e127ad39e742396030352240d829bc903b1d4464 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Mon, 3 Oct 2022 22:22:50 +0200 Subject: godot: inital Godot 4 migration --- Tests/Terminal/test_OutputArea.gd | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Tests/Terminal/test_OutputArea.gd') diff --git a/Tests/Terminal/test_OutputArea.gd b/Tests/Terminal/test_OutputArea.gd index 88beddb..51be7ba 100644 --- a/Tests/Terminal/test_OutputArea.gd +++ b/Tests/Terminal/test_OutputArea.gd @@ -9,10 +9,10 @@ func _get_line_container() -> VBoxContainer: return _instance.get_node('%LineContainer') as VBoxContainer func after_each(): - yield(yield_frames(1), YIELD) + await yield_frames(1).YIELD func before_each(): - var scene = Scene.instance() + var scene = Scene.instantiate() scene.OutputBlockScene = preload('res://Scenes/Terminal/OutputBlock.tscn') _instance = add_child_autofree(scene) @@ -23,26 +23,26 @@ func test_can_be_instantiated(): assert_not_null(_instance) func test_LineContainer_is_empty_after_instantiation(): - assert_true(_get_line_container().get_children().empty()) + assert_true(_get_line_container().get_children().is_empty()) func test_TextBlocks_is_empty_after_instantiation(): - assert_true(_instance.TextBlocks.empty()) + assert_true(_instance.TextBlocks.is_empty()) func test_LineContainer_is_not_empty_after_calling_Push_with_a_non_empty_string_as_text(): _instance.Push('this is some test data') - assert_false(_get_line_container().get_children().empty()) + assert_false(_get_line_container().get_children().is_empty()) func test_LineContainer_is_empty_after_calling_Push_with_an_empty_string_as_text(): _instance.Push('') - assert_true(_get_line_container().get_children().empty()) + assert_true(_get_line_container().get_children().is_empty()) func test_TextBlocks_is_not_empty_after_calling_Push_with_a_non_empty_string_as_text(): _instance.Push('this is some test data') - assert_false(_instance.TextBlocks.empty()) + assert_false(_instance.TextBlocks.is_empty()) func test_TextBlocks_is_empty_after_calling_Push_with_an_empty_string_as_text(): _instance.Push('') - assert_true(_instance.TextBlocks.empty()) + assert_true(_instance.TextBlocks.is_empty()) func test_TextBlocks_contains_all_pushed_texts_in_the_push_order(): var texts = ['text block a', 'text block b'] -- cgit v1.2.3