Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift Covers Native Methods for Mathy Godot Types, Add Testing Framework #628

Draft
wants to merge 100 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6b9e945
specialize snapped for Int32 and Int64
Nov 19, 2024
6664573
clean up generator argument bindings
Nov 19, 2024
13e0767
set up NativeCovers target/product and start on Vector2i
Nov 18, 2024
5c1cabf
add CNativeCovers with C shims
Nov 19, 2024
7652240
finish writing Vector2i native covers
Nov 19, 2024
b5092b9
rename NativeCovers to SwiftCovers
Nov 19, 2024
22d7e66
wip: load SwiftCovers source into Generator
Nov 19, 2024
4600108
wip: parse SwiftCovers
Nov 19, 2024
5fb6dd2
rename Vector2i.arithmetic.swift to Vector2i.covers.swift
Nov 19, 2024
4bebf38
extract method, operator, and init covers
Nov 19, 2024
fb3312c
use covers for operators
dyoustra Nov 19, 2024
0b862bb
add method covers
dyoustra Nov 19, 2024
59ad931
add constructor covers
dyoustra Nov 19, 2024
bd665f0
get rid of typealias
dyoustra Nov 19, 2024
ffa4e98
inform SwiftPM of new generated source file dependencies
Nov 19, 2024
e25d9bd
only generate member default initializations for default init and for…
Nov 19, 2024
519d0d9
rename CSwiftCovers to CWrappers and import it only in SwiftGodot
Nov 19, 2024
2d62f9b
get Vector2i covers to compile
Nov 19, 2024
7b2b5a6
clean up conditional compilation generation
Nov 20, 2024
17758e0
emit cover for subscript
Nov 20, 2024
303b6ed
only process .swift files in SwiftCovers
Nov 20, 2024
a92da0b
write README for SwiftCovers
Nov 20, 2024
27d735b
add GodotTestPattern environment variable to filter tests that requir…
Nov 20, 2024
fa5e817
pass CUSTOM_BUILTIN_IMPLEMENTATIONS compilation condition to SwiftGod…
Nov 20, 2024
aad8a51
sketch out self-updating tests
Nov 21, 2024
13388c9
change ifCustomBuiltinImplementation to useSwiftCoverIfAvailable and …
Nov 21, 2024
2462387
emit covers for subscript accessors individually
Nov 21, 2024
5a3941d
add TESTABLE_SWIFT_COVERS
Nov 21, 2024
5ca3103
add useSwiftCovers global for use by tests
Nov 21, 2024
b71a743
use useSwiftCovers for testing
Nov 21, 2024
9dab4de
apply customBuiltinImplementationsSettings to SwiftGodotTestability
Nov 21, 2024
5d7e949
fix indentation
Nov 21, 2024
6875c33
check for bytewise equality to handle nans
Nov 21, 2024
c09587c
wip: write Vector2i tests using checkCover
Nov 21, 2024
ead7276
add int32_for_double
Nov 21, 2024
f1a5f10
fix Vector2i.clampi, Vector2i.snappedi
Nov 22, 2024
e60b96d
wip: more Vector2i cover tests
Nov 22, 2024
cf9b93a
fix operator mapping for "or", "<", "<="
Nov 22, 2024
9307f19
finish Vector2iTests
Nov 22, 2024
ec59fcb
merge main into covers
Nov 22, 2024
fb30a80
Add Vector2 Method Covers
dyoustra Nov 22, 2024
c70f4a9
fix var constant
dyoustra Nov 22, 2024
2ff9a6f
Omit is_normalized
dyoustra Nov 22, 2024
30c6a5a
exclude Sources/SwiftCovers/README.md from build
Nov 22, 2024
c7d1629
ignore *.d and *.swiftdeps
Nov 22, 2024
87ff490
more comments about broken Vector2i % Vector2i
Nov 22, 2024
52e47c9
remove unneeded casts
Nov 22, 2024
c704488
enable TESTABLE_SWIFT_COVERS
Nov 22, 2024
8dfc42f
ignore /libgodot.xcframework even if it's not a folder
Nov 22, 2024
988f165
write Vector3i.covers.swift
Nov 22, 2024
0b4b974
handle cover methods that return optional
Nov 30, 2024
0dce502
add Vector4i covers
Dec 1, 2024
2afce2a
move CMP_EPSILON to SwiftCoverSupport.swift
Dec 1, 2024
7dd2fd5
Add Vector2Tests
dyoustra Dec 3, 2024
14e3ebf
Add basis cover
dyoustra Dec 4, 2024
83bb012
Add Vector3 Covers
dyoustra Dec 4, 2024
f5c712e
Add operator covers for Vector2
dyoustra Dec 4, 2024
7cb6980
Add operator tests to Vector2Tests
dyoustra Dec 4, 2024
265f4f8
write TinyGen
Dec 1, 2024
b281639
redo Vector2i cover tests using TinyGen
Dec 1, 2024
2420a44
rewrite Vector3i cover tests using TinyGen
Dec 3, 2024
d5a7e1c
redo Vector4i cover tests using TinyGen
Dec 3, 2024
7023c49
fix key construction for init methods taking Float arguments
Dec 4, 2024
d105f73
implement Plane covers
Dec 6, 2024
f705d6c
add more versions of GD.isEqualApprox
Dec 7, 2024
05959af
add Float cubic interpolation helpers
Dec 7, 2024
9eef1ef
add sign(Double) helper
Dec 7, 2024
3a7d2eb
allow covers for static methods
Dec 7, 2024
e66c31e
implement Quaternion covers
Dec 7, 2024
c045d90
fix SipHash_2_4 when buffer is nearly full
Dec 8, 2024
53363f4
fix QuaternionCoverTests for optimized libgodot
Dec 8, 2024
4feb3ff
Redo Vector2 Cover tests for TinyGen
dyoustra Dec 10, 2024
981a105
Add Vector4 Covers
dyoustra Dec 10, 2024
2cecad9
add init for Vector3 Covers
dyoustra Dec 10, 2024
b86e70e
Transform2D covers (no operator)
dyoustra Dec 11, 2024
0a84b66
Add Transform2D covers
dyoustra Dec 11, 2024
63e70ed
Fix Transform2D Covers
dyoustra Dec 11, 2024
7d44e3d
Add Transform3D Covers
dyoustra Dec 11, 2024
10e7e42
Moved V2CoverTests
dyoustra Dec 11, 2024
b0e3cd5
Fix V2CoverTests for TinyGen
dyoustra Dec 11, 2024
897ca86
Add Vector3CoverTests
dyoustra Dec 11, 2024
8e95446
Move TinyGen test stuff around, normalize naming
dyoustra Dec 11, 2024
3803fe9
Change v3 rotated to use basis.xform
dyoustra Dec 11, 2024
9713213
Change XCTFail message for TinyGen
dyoustra Dec 11, 2024
8e731ea
only compute ulps when needed
Dec 10, 2024
614d67d
compute sign like Godot SIGN macro for matching NaN handling
Dec 10, 2024
a81c589
fix some Vector2 covers
Dec 10, 2024
7bfaab1
Add Vector4 Cover Tests
dyoustra Dec 11, 2024
c92644f
Add Transform2DCoverTests
dyoustra Dec 11, 2024
532f327
Add Transform3DCoverTests
dyoustra Dec 11, 2024
2d5beec
Add methods to fix V3 tests
dyoustra Dec 12, 2024
36a8de2
Fix Transform2D subscript cover
dyoustra Dec 12, 2024
852f891
Transform2D fix testInit
dyoustra Dec 12, 2024
92adcb6
pass className GD instead of Godot for cover lookup
Dec 11, 2024
fbb0bf1
use cover if available for class method
Dec 11, 2024
4cbbbf5
write some GD covers
Dec 11, 2024
ea70e26
write Basis covers
Dec 11, 2024
36b5aae
fix some Vector3 covers
Dec 12, 2024
9b4e34c
comment out or fix some broken stuff
Dec 12, 2024
724ef78
Transpose Basis construction in Transform3D construction
dyoustra Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix indentation
Rob Mayoff committed Nov 21, 2024
commit 5d7e949852b0b5cbfae57996d30941dc73fb09df
2 changes: 1 addition & 1 deletion Sources/SwiftGodotTestability/GodotTestRunner.swift
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ class __GodotTestRunner: XCTestCase {
.replacingOccurrences(of: "-[", with: "")
.replacingOccurrences(of: "]", with: "")
.replacingOccurrences(of: " ", with: "/")
return name.wholeMatch(of: testNamePatternFromEnvironment) != nil
return name.wholeMatch(of: testNamePatternFromEnvironment) != nil
}

/// Extract all the godot tests from a tree of XCTest objects.