Ticket #4353: 0001-Fix-a-test-failure.patch

File 0001-Fix-a-test-failure.patch, 1.1 KB (added by leper, 8 years ago)

Taken from the SM45 work.

  • binaries/data/mods/public/simulation/components/tests/test_Attack.js

    From 054c8613fe73010c91fcb39e2e6730598bbc73de Mon Sep 17 00:00:00 2001
    From: leper <leper@wildfiregames.com>
    Date: Tue, 8 Nov 2016 06:17:55 +0100
    Subject: [PATCH] Fix a test failure.
    
    ---
     binaries/data/mods/public/simulation/components/tests/test_Attack.js | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/binaries/data/mods/public/simulation/components/tests/test_Attack.js b/binaries/data/mods/public/simulation/components/tests/test_Attack.js
    index 455ce1a..4bae652 100644
    a b function testGetBestAttackAgainst(defenderClass, bestAttack, isBuilding = false)  
    152152        if (!isBuilding)
    153153            allowCapturing.push(false);
    154154
    155         for (let allowCapturing of allowCapturing)
    156             TS_ASSERT_EQUALS(cmpAttack.GetBestAttackAgainst(defender, allowCapturing), bestAttack);
     155        for (let ac of allowCapturing)
     156            TS_ASSERT_EQUALS(cmpAttack.GetBestAttackAgainst(defender, ac), bestAttack);
    157157    });
    158158}
    159159