1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-23 01:18:46 +00:00
Commit Graph

912 Commits

Author SHA1 Message Date
bc3dedfa7d
fix: rename DebugEx to DebugUtility
Prevents .NET analysers from throwing errors.
2023-04-02 03:10:36 +01:00
08a4df0c64
perf: remove local method, exclude coverage for default arm 2023-04-02 02:56:50 +01:00
85f4e8c733
test: bring coverage to 100% for AddOrUpdate 2023-04-02 01:16:12 +01:00
bfd3a5663d
[ci skip] ci: enable .NET analyzers for all projects 2023-04-02 01:11:14 +01:00
c0bd7e0032
ci: exclude uncoverable projects from coverage 2023-04-02 01:07:35 +01:00
427563bfdb
[ci skip] test: CollectCoverage:true 2023-04-02 01:07:01 +01:00
e5ec06cfe5
[ci skip] test: output debug symbols 2023-04-02 01:06:38 +01:00
58c333a173
ci: exclude default arm of Rune.Repeat from coverage 2023-04-02 01:05:27 +01:00
95cd3e8cbc
test: bring coverage to 100% for X10D.Collections.SpanExtensions 2023-04-02 00:36:31 +01:00
f10ff4a36c
test: add tests for Span<T>.Count 2023-04-02 00:18:47 +01:00
586057ba3d
test: add tests for ReverseElements (#73) 2023-04-01 23:48:08 +01:00
6f16c0df3c
test: add tests for CorrectBoolean (#73) 2023-04-01 23:40:41 +01:00
34c49a2228
fix: fix bug introduced by d29663f081
Since value is a ref returned value, mutating it before returning was actually intended behaviour, since the reassignment causes the dictionary value to be mutated too.

Also, what game was this ref watching?!
2023-04-01 22:32:02 +01:00
9df0fde96d
ci(dotnet): run framework-specific tests separately
This change also specifies multiple dotnet-version values for the setup-dotnet step.
2023-04-01 22:21:14 +01:00
8a4e053c85
fix: expose internals to X10D.Tests project 2023-04-01 22:12:16 +01:00
d29663f081
style: cleanup DictionaryExtensions
* Explicit type is used where type is not evident.
* Conditions are inlined with a ternary and the return value is used directly.
* System.Runtime.InteropServices is only imported for .NET >= 6.0
2023-04-01 22:05:10 +01:00
b79435211a
style: remove redundant else branches 2023-04-01 22:01:07 +01:00
d7bf9d1788
style(test): remove throws of NotImplementedException 2023-04-01 22:00:40 +01:00
23282db3a9
fix(test): import X10D.Core for NextSingle to work on < net6.0 2023-04-01 22:00:11 +01:00
87b6dbdd56
test: bring coverage to 100% for integer Unpack (#70) 2023-04-01 21:56:45 +01:00
5f21a2102d
feat: pack README.md in nupkg 2023-04-01 21:16:57 +01:00
ca5f95bbf6
test: test RuneExtensions for .NET >= 5 2023-04-01 18:59:24 +01:00
e52e9096e0
feat: expose ComplexSqrt to all frameworks 2023-04-01 18:54:04 +01:00
1acee3bf72
fix(test): fix incorrect date being returned for .NET Standard 2.1 2023-04-01 18:20:44 +01:00
5714ef73c1
test: 100% coverage on stream Read/Write methods 2023-04-01 18:17:50 +01:00
fa2236e72a
fix: write float, not double, in Stream.WriteSingle
This was a side effect of 2815c505c3 since I had copy/pasted the blocks. Oops.
2023-04-01 17:14:46 +01:00
990f860b39
perf: accept ReadOnlySpan<byte> in WriteInternal
This method does not mutate the input span in any way, and so its input can be read-only.
2023-04-01 17:11:47 +01:00
2815c505c3
fix: fix incorrect float/double being written for netstandard2.1
The call to _To_Bits yields the result containing the same bytes, but not the same value. This value was then stored as-is into the parameter, which causes a conversion on how the value is stored, ultimately causing the wrong value to be written to the stream.
2023-04-01 17:11:05 +01:00
677259b91c
fix: fixed Stream.ReadSingle returning wrong type
ReadSingle previously returned a double, and this never failed unit tests since float -> double is a widening conversion, with values being comparable.
2023-04-01 17:08:34 +01:00
b2a27cdafb
fix(test): fix Clear unit test not creating the temp directory 2023-04-01 17:06:19 +01:00
35113fac27
test: run tests for .NET 7, 6, and Core 3.1
.NET Core 3.1 allows testing of the .NET Standard 2.1 implementation of X10D
2023-04-01 17:05:46 +01:00
39c8c7defb
style: cluster throw helpers together to reduce branch repetition 2023-04-01 14:37:37 +01:00
431e72a4c1
fix: use ArgumentNullException throw helper for .NET >=6
Some of these directives were incorrectly written as #if NET6_0, when ThrowIfNull is available in all future versions too. The macro has been fixed to #if NET6_0_OR_GREATER.

For other methods, the branch has been introduced where it didn't exist before.
2023-04-01 14:35:00 +01:00
dd325ba5c9
test: test Equals(object) for various Drawing types
This brings coverage to 100% for the affected types.
2023-04-01 00:30:51 +01:00
8b768f824c
test: add tests for Point.IsOnLine and PointF.IsOnLine 2023-04-01 00:30:04 +01:00
6e7e162ffe
test: 100% coverage on MultiplicativePersistence 2023-03-31 23:19:21 +01:00
ee0df8c9c2
[ci skip] docs: vertically center Unity branding 2023-03-31 23:06:48 +01:00
150028716c
[ci skip] fix(docs): rename master -> main
This change was made quite a while ago, actually. Surprisingly, it's gone unnoticed for a long time. 

"Nevermore," quoth the raven.
2023-03-31 23:02:56 +01:00
4cfa7fef52
[ci skip] fix(docs): fix CONTRIBUTING.md link 2023-03-31 23:01:19 +01:00
51ae070210
[ci skip] fix(docs): -y
It's 11pm leave me alone.
2023-03-31 22:58:18 +01:00
83f9737b02
[ci skip] docs(repo): add tailored README for X10D.Unity 2023-03-31 22:57:09 +01:00
6eb74c15ee
[ci skip] style: add social embed branding export 2023-03-31 22:30:25 +01:00
78f2c13a1b
style: update branding
The icon is now exported from vector artboards rather than a raster.
2023-03-31 22:22:52 +01:00
ce1c2e8397
[ci skip] docs(style): update branding 2023-03-31 22:19:41 +01:00
ec266063f9
fix(DoS): specify timeout in Regex ctor
This isn't actually a "fix", the method may be slow by design if the source is lazily enumerated. SonarCloud, however, did not like this method not having an explicit timeout. If SonarCloud continues to complain, we'll just shut its mouth masking tape and throw it in the broom closet.
2023-03-31 21:29:29 +01:00
e70781ef0f
perf: remove redundant 6k ± 1 check in IsPrime
No integers >3 satisfy the condition of being odd AND not being a multiple of 3 (as checked above) AND not being in the form 6k ± 1. This condition never evaluates to true, and so the return is never reached and was preventing this method from hitting 100% code coverage.
2023-03-31 21:25:17 +01:00
c8ccb1deb8
perf: remove redundant 0 check in Sqrt
This check was a defensive manoeuvrer in the event that the input is 0, but this condition has already been verified to be false with the switch guard clause.

This changes bumps coverage to 100% for Sqrt.
2023-03-31 20:40:06 +01:00
3d2baf595b
test: 100% coverage on Wrap for all types 2023-03-31 20:37:50 +01:00
3f47a4ec44
[ci skip] test: rename Pack8Bit to PackByte 2023-03-31 20:23:56 +01:00
62034ded75
style(test): segment methods to partials
This changes introduces the Moq package to create mocked objects implementing IDisposable, rather than defining a concrete class.
2023-03-31 20:21:17 +01:00