refactor: enhance test framework with automated resource tracking and scripted error capture capabilities
This commit is contained in:
@@ -29,15 +29,15 @@ func test_all_modes_in_enum():
|
||||
# String Conversion Tests
|
||||
# =============================================================================
|
||||
|
||||
# Test 3: from_string recognizes "Candy Cannon Survival"
|
||||
# Test 3: from_string recognizes "Candy Pump Survival"
|
||||
func test_from_string_candy_cannon():
|
||||
var result = GameMode.from_string("Candy Cannon Survival")
|
||||
assert_eq(result, GameMode.Mode.GAUNTLET, "from_string should parse 'Candy Cannon Survival' as GAUNTLET")
|
||||
var result = GameMode.from_string("Candy Pump Survival")
|
||||
assert_eq(result, GameMode.Mode.GAUNTLET, "from_string should parse 'Candy Pump Survival' as GAUNTLET")
|
||||
|
||||
# Test 4: mode_to_string returns "Candy Cannon Survival" for GAUNTLET
|
||||
# Test 4: mode_to_string returns "Candy Pump Survival" for GAUNTLET
|
||||
func test_mode_to_string_gauntlet():
|
||||
var result = GameMode.mode_to_string(GameMode.Mode.GAUNTLET)
|
||||
assert_eq(result, "Candy Cannon Survival", "mode_to_string should return 'Candy Cannon Survival'")
|
||||
assert_eq(result, "Candy Pump Survival", "mode_to_string should return 'Candy Pump Survival'")
|
||||
|
||||
# Test 5: Round-trip conversion is lossless
|
||||
func test_round_trip_conversion():
|
||||
@@ -61,10 +61,10 @@ func test_unknown_string_defaults_freemode():
|
||||
# get_all_modes Tests
|
||||
# =============================================================================
|
||||
|
||||
# Test 8: get_all_modes includes "Candy Cannon Survival"
|
||||
# Test 8: get_all_modes includes "Candy Pump Survival"
|
||||
func test_get_all_modes_includes_gauntlet():
|
||||
var modes = GameMode.get_all_modes()
|
||||
assert_has(modes, "Candy Cannon Survival", "get_all_modes should include 'Candy Cannon Survival'")
|
||||
assert_has(modes, "Candy Pump Survival", "get_all_modes should include 'Candy Pump Survival'")
|
||||
|
||||
# Test 9: get_all_modes returns exactly 4 entries
|
||||
func test_get_all_modes_count():
|
||||
@@ -77,7 +77,7 @@ func test_get_all_modes_order():
|
||||
assert_eq(modes[0], "Freemode", "First mode should be Freemode")
|
||||
assert_eq(modes[1], "Stop n Go", "Second mode should be Stop n Go")
|
||||
assert_eq(modes[2], "Tekton Doors", "Third mode should be Tekton Doors")
|
||||
assert_eq(modes[3], "Candy Cannon Survival", "Fourth mode should be Candy Cannon Survival")
|
||||
assert_eq(modes[3], "Candy Pump Survival", "Fourth mode should be Candy Pump Survival")
|
||||
|
||||
# =============================================================================
|
||||
# is_restricted Tests
|
||||
@@ -103,10 +103,10 @@ func test_all_restricted_modes():
|
||||
# LobbyManager Integration Tests
|
||||
# =============================================================================
|
||||
|
||||
# Test 14: Lobby available_game_modes includes "Candy Cannon Survival"
|
||||
# Test 14: Lobby available_game_modes includes "Candy Pump Survival"
|
||||
func test_lobby_modes_includes_gauntlet():
|
||||
var modes = LobbyManager.available_game_modes
|
||||
assert_has(modes, "Candy Cannon Survival", "LobbyManager.available_game_modes should include 'Candy Cannon Survival'")
|
||||
assert_has(modes, "Candy Pump Survival", "LobbyManager.available_game_modes should include 'Candy Pump Survival'")
|
||||
|
||||
# Test 15: gauntlet_manager.gd script file exists
|
||||
func test_gauntlet_manager_script_exists():
|
||||
|
||||
Reference in New Issue
Block a user