Skip to content

Commit

Permalink
yea
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Oct 10, 2024
1 parent afbc83d commit 458a10b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions code/modules/unit_tests/gun_sanity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
var/obj/item/gun/target_gun = new gun_path()
log_test("Testing [target_gun.type]")
if(target_gun.default_ammo_type)
TEST_ASSERT(ispath(target_gun.default_ammo_type), "The default ammo in [target_gun.type] is not a type")
TEST_ASSERT(target_gun.default_ammo_type in target_gun.allowed_ammo_types, "The default ammo in [target_gun.type] in not in its allowed ammo types")
TEST_ASSERT_EQUAL(target_gun.magazine?.type, target_gun.default_ammo_type, "[target_gun.type]'s mag does not equal its default_ammo_type")
if(ispath(target_gun.default_ammo_type))
TEST_FAIL("The default ammo in [target_gun.type] is not a type")

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/deagle is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/deagle/ctf is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/deagle/gold is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/deagle/camo is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/candor is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/candor/factory is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/candor/phenex is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/commander is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/commander/inteq is not a type

Check failure on line 7 in code/modules/unit_tests/gun_sanity.dm

View workflow job for this annotation

GitHub Actions / Integration Tests (BASIC_TESTS) / run_integration_tests

/datum/unit_test/gun_sanity: /datum/unit_test/gun_sanity

The default ammo in /obj/item/gun/ballistic/automatic/pistol/commissar is not a type

if(!(target_gun.default_ammo_type in target_gun.allowed_ammo_types))
TEST_FAIL("The default ammo in [target_gun.type] in not in its allowed ammo types")

if(!(target_gun.magazine?.type == target_gun.default_ammo_type))
TEST_FAIL("[target_gun.type]'s mag does not equal its default_ammo_type")
else
TEST_ASSERT(!target_gun.internal_magazine, "A gun with an internal mag has no mag")
if(target_gun.internal_magazine)
TEST_FAIL("[target_gun.type] with an internal mag has no mag")
qdel(target_gun)

0 comments on commit 458a10b

Please sign in to comment.