|
|
|
@ -88,6 +88,45 @@
|
|
|
|
|
buildSpec loadPath randRows randCols pWidth colourString savePath |
|
|
|
|
intendedSpec = spec |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``Can build a SkiaSpec as intended`` () = |
|
|
|
|
let colourString = randomColourString () |
|
|
|
|
let colour = parseSkiaColour colourString |
|
|
|
|
let pWidth = float32 (Random().Next()) |
|
|
|
|
let randRows = (Random().Next()) |
|
|
|
|
let randCols = (Random().Next()) |
|
|
|
|
let intendedSpec = |
|
|
|
|
{ originalPath = loadPath |
|
|
|
|
savePath = savePath |
|
|
|
|
skColour = colour |
|
|
|
|
penWidth = pWidth |
|
|
|
|
rows =randRows |
|
|
|
|
columns = randCols } |
|
|
|
|
let spec = |
|
|
|
|
buildSkiaSpec loadPath randRows randCols pWidth colourString savePath |
|
|
|
|
intendedSpec = spec |
|
|
|
|
|
|
|
|
|
[<Property>] |
|
|
|
|
let ``Can build a SkiaRGBSpec as intended`` () = |
|
|
|
|
let r = (Random().Next()) |
|
|
|
|
let g = (Random().Next()) |
|
|
|
|
let b = (Random().Next()) |
|
|
|
|
let pWidth = float32 (Random().Next()) |
|
|
|
|
let randRows = (Random().Next()) |
|
|
|
|
let randCols = (Random().Next()) |
|
|
|
|
let intendedSpec = |
|
|
|
|
{ originalPath = loadPath |
|
|
|
|
savePath = savePath |
|
|
|
|
red = (float32 r) |
|
|
|
|
green = (float32 g) |
|
|
|
|
blue = (float32 b) |
|
|
|
|
penWidth = pWidth |
|
|
|
|
rows =randRows |
|
|
|
|
columns = randCols } |
|
|
|
|
let spec = |
|
|
|
|
buildSkiaRGBSpec loadPath randRows randCols pWidth r g b savePath |
|
|
|
|
intendedSpec = spec |
|
|
|
|
|
|
|
|
|
module UnitTests = |
|
|
|
|
|
|
|
|
|
open System.IO |
|
|
|
|