Compare commits
No commits in common. "56ef751145bc4f18362bfbca19cada68e86c5525" and "c09915ac604e76090d311019fa16697221c989a5" have entirely different histories.
56ef751145
...
c09915ac60
5 changed files with 0 additions and 46 deletions
|
|
@ -1,13 +0,0 @@
|
||||||
namespace Mutannot
|
|
||||||
|
|
||||||
open System
|
|
||||||
|
|
||||||
[<AttributeUsage(AttributeTargets.Method, AllowMultiple = true)>]
|
|
||||||
type MutationCaseAttribute(id: string, file: string, line: int, find: string, replace: string) =
|
|
||||||
inherit Attribute()
|
|
||||||
|
|
||||||
member _.Id = id
|
|
||||||
member _.File = file
|
|
||||||
member _.Line = line
|
|
||||||
member _.Find = find
|
|
||||||
member _.Replace = replace
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="MutationCaseAttribute.fs" />
|
|
||||||
<Compile Include="FakeHome.fs" />
|
<Compile Include="FakeHome.fs" />
|
||||||
<Compile Include="GenHelpers.fs" />
|
<Compile Include="GenHelpers.fs" />
|
||||||
<Compile Include="InteractionListHelpers.fs" />
|
<Compile Include="InteractionListHelpers.fs" />
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
namespace NightLight.Core.Tests
|
namespace NightLight.Core.Tests
|
||||||
|
|
||||||
open Mutannot
|
|
||||||
open NightLight.Core.Core
|
open NightLight.Core.Core
|
||||||
open NightLight.Core.Tests.InteractionListGenerators
|
open NightLight.Core.Tests.InteractionListGenerators
|
||||||
open NightLight.Core.Tests.InteractionListHelpers
|
open NightLight.Core.Tests.InteractionListHelpers
|
||||||
|
|
@ -32,7 +31,6 @@ type NightLightTests() =
|
||||||
fakeHome
|
fakeHome
|
||||||
|
|
||||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
|
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |])>]
|
||||||
[<MutationCase("all-lights-right-color-night-is-yellow", "NightLight.Core/Moods.fs", 16, "Red", "Yellow")>]
|
|
||||||
let ``All lights should either be off or have the right color`` (interactions: Interaction list) =
|
let ``All lights should either be off or have the right color`` (interactions: Interaction list) =
|
||||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||||
let partOfDay = getPartOfDayAfterInteractions interactions
|
let partOfDay = getPartOfDayAfterInteractions interactions
|
||||||
|
|
@ -50,7 +48,6 @@ type NightLightTests() =
|
||||||
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
||||||
|
|
||||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 500)>]
|
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 500)>]
|
||||||
[<MutationCase("brightness-command-off-by-one", "NightLight.Core/ZigbeeCommands.fs", 40, "Brightness b -> b", "Brightness b -> b + 1")>]
|
|
||||||
let ``All lights should either be off or have a brightness that fits its color`` (interactions: Interaction list) =
|
let ``All lights should either be off or have a brightness that fits its color`` (interactions: Interaction list) =
|
||||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||||
let time = getTimeAfterInteractions interactions |> _.TimeOfDay
|
let time = getTimeAfterInteractions interactions |> _.TimeOfDay
|
||||||
|
|
@ -91,7 +88,6 @@ type NightLightTests() =
|
||||||
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
|> Prop.trivial (fakeHome.LightsThatAreOn.Length = 0)
|
||||||
|
|
||||||
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 500)>]
|
[<Property(Arbitrary = [| typeof<ArbitraryInteractions> |], MaxTest = 500)>]
|
||||||
[<MutationCase("lights-default-to-off", "NightLight.Core/NightLightStateMachine.fs", 145, "light, On", "light, Off")>]
|
|
||||||
let ``All lights with power should have the correct state`` (interactions: Interaction list) =
|
let ``All lights with power should have the correct state`` (interactions: Interaction list) =
|
||||||
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
let fakeHome = createFakeHomeWithNightLightAndInteract interactions
|
||||||
|
|
||||||
|
|
|
||||||
22
flake.lock
generated
22
flake.lock
generated
|
|
@ -42,27 +42,6 @@
|
||||||
"url": "https://codeberg.org/svenvanheugten/git-check-assertions.git"
|
"url": "https://codeberg.org/svenvanheugten/git-check-assertions.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mutannot": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1777439386,
|
|
||||||
"narHash": "sha256-nTBcu7NsN1jwoXr8SoKaW+0EPb5klTU6SSWuXOeuEuA=",
|
|
||||||
"ref": "main",
|
|
||||||
"rev": "1019d3c5d04d441d12b915876110f7493270b988",
|
|
||||||
"revCount": 19,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.memcmp.org/svenvanheugten/mutannot.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "main",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.memcmp.org/svenvanheugten/mutannot.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773507054,
|
"lastModified": 1773507054,
|
||||||
|
|
@ -83,7 +62,6 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"git-check-assertions": "git-check-assertions",
|
"git-check-assertions": "git-check-assertions",
|
||||||
"mutannot": "mutannot",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
mutannot = {
|
|
||||||
url = "git+https://git.memcmp.org/svenvanheugten/mutannot.git?ref=main";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
|
|
@ -18,7 +14,6 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
git-check-assertions,
|
git-check-assertions,
|
||||||
mutannot,
|
|
||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (
|
flake-utils.lib.eachDefaultSystem (
|
||||||
system:
|
system:
|
||||||
|
|
@ -31,7 +26,6 @@
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.dotnet-sdk_10
|
pkgs.dotnet-sdk_10
|
||||||
git-check-assertions.packages.${system}.default
|
git-check-assertions.packages.${system}.default
|
||||||
mutannot.packages.${system}.default
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue