Commit graph

15 commits

Author SHA1 Message Date
Dunedan
93ce94655d
Use @stylistic/brace-style for eslint
Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.

To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.

While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.

[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
2026-01-12 21:33:52 +01:00
Stan
dc04f3f432
Fix autofixable eslint warnings for eqeqeq
Ref: #7812
Pull Request: #8129
2025-06-26 11:03:19 +02:00
Ralph Sennhauser
08a5f4405f
Fix eslint rule 'no-empty'
Manual fix needed, using 'noop' comment to silence warnings and convert
for loop to a probably more readable while loop.

eslint --no-config-lookup --rule '"no-empty": 1'

Ref: #7812
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-05-04 20:05:02 +02:00
phosit
6ce2fc53ea Allow to use a generator as MapGenerator
This way it's clear what's the input and what's the output of the
computation.
All map generation scripts should reman working. They are adopted in a
future commit.

`Engine.SetProgress` and `Engine.ExportMap` can be removed in a future
commit.

Comments by: @marder, @sera, @Stan
Differential Revision: https://code.wildfiregames.com/D5220
This was SVN commit r28093.
2024-05-22 15:52:12 +00:00
elexis
5fe58d80fd Some more random random map script unit tests and ASSERT functions, refs #4827.
Differential Revision: https://code.wildfiregames.com/D2603
This was SVN commit r23460.
2020-01-29 18:52:48 +00:00
bb
3a77eb25d3 Fix ESLint semicolon-related warnings
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2004
This was SVN commit r22419.
2019-07-01 11:09:19 +00:00
elexis
e185820e10 Implement TS_ASSERT_NUMBER as a future precaution of the integer epsilon slip in 30fe33bb0b.
Add another vector rotation test.

This was SVN commit r21064.
2018-01-29 11:55:43 +00:00
elexis
30fe33bb0b Add another Vector2D rotation test (illustrating the most common rmgen rotation transformation).
TS_ASSERT_EQUALS_APPROX must not silently pass if epsilon wasn't given.
Sort Vector2D.rotate summands by component rather than saving one
character.

This was SVN commit r21062.
2018-01-29 09:51:20 +00:00
elexis
5245e9983b Rename expectException from 1cdc8f1356 to TS_ASSERT_EXCEPTION.
Move it from the test of the testsetup to the setup of the tests, so it
can be reused by tests, refs #4759, D871.

This was SVN commit r20989.
2018-01-23 20:00:52 +00:00
elexis
a2f7dba96c Move simulation test for approximate equality from e18598cd62 to the test setup, so that it can be reused.
Remove unneeded helper variable from e18598cd62 as intended by
7778a7b436 by using the set method.

This was SVN commit r20467.
2017-11-16 23:54:38 +00:00
Itms
58e5642c48 Do not print things outside of the standard TS_FAIL output, or garbage will be added to the XML output when running the tests under Jenkins.
This patch has the extra benefit that the stack trace actually appears
on Windows now, instead of going into the void.

Tested by Vladislav, refs #4419

This was SVN commit r19045.
2016-12-18 11:16:19 +00:00
Ykkrosh
7c2e9027c2 # Rewrite of the game's simulation system
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)

This was SVN commit r7259.
2010-01-09 19:20:14 +00:00
Ykkrosh
cf17fe13ce # Added test for old Collada import error.
This was SVN commit r6918.
2009-06-23 17:47:37 +00:00
Ykkrosh
d2935684ff Collada: Integrated skeleton XML with game. Added some tests. Fixed memory leak when loading ill-formed XML.
Added TestLogger, so tests can check the right log messages were
produced.

This was SVN commit r4960.
2007-03-16 23:32:10 +00:00
Ykkrosh
f6de818ea8 # Added support for automatically loading 3d models in the COLLADA format.
* CMeshManager: Changed to check for .pmd and .dae files and convert
and cache as appropriate.
 * CModelDef: Fixed misinterpreted doc comments in.
 * lib:
   * Fixed init/shutdown sequences to support multiple VFS-using tests
correctly.
   * Fixed most reported memory leaks from the new leak-reporting test
system.
   * Fixed error when trying to dump debug data about fonts after
unloading them.
 * Added sphere dae/pmd data for tests.
 * Added output buffering to DAE->PMD converter.
 * Added precompiled COLLADA converter DLLs.
 * Removed old redundant conversion script.

This was SVN commit r4709.
2006-12-20 03:22:24 +00:00