Skip to content

Releases: haf/expecto

v2.4.0 – Welch's T-test statistical performance testing

03 Jan 12:11
@haf haf
Compare
Choose a tag to compare

I'm happy to release another minor version of Expecto with a new performance-test feature – namely Expect.isFasterThan.

Don't let the name mislead you. It's actually a more profound test that builds on Student's T-test by using Welch's T-test for validating the hypothesis that the two passed functions are equally fast. Here's a sample:

    testSequenced (testCase "matrix" <| fun _ ->
      let n = 100
      let rand = Random 123
      let a = Array2D.init n n (fun _ _ -> rand.NextDouble())
      let b = Array2D.init n n (fun _ _ -> rand.NextDouble())
      let c = Array2D.zeroCreate n n

      let reset() =
        for i = 0 to n-1 do
            for j = 0 to n-1 do
              c.[i,j] <- 0.0

      let mulIJK() =
        for i = 0 to n-1 do
          for j = 0 to n-1 do
            for k = 0 to n-1 do
              c.[i,k] <- c.[i,k] + a.[i,j] * b.[j,k]

      let mulIKJ() =
        for i = 0 to n-1 do
          for k = 0 to n-1 do
            let mutable t = 0.0
            for j = 0 to n-1 do
              t <- t + a.[i,j] * b.[j,k]
            c.[i,k] <- t
      Expect.isFasterThanSub (fun measurer -> reset(); measurer mulIKJ ())
                             (fun measurer -> reset(); measurer mulIJK ())
                             "ikj faster than ijk")

More information about this feature can be found in the docs.

A big thanks to @AnthonyLloyd for contributing this code!

Happy performance testing!

v2.3.1 – bugfixes

03 Jan 11:58
@haf haf
Compare
Choose a tag to compare
Version 2.3.1

v2.3.0 – improved printouts, containsAll function, internal tests

25 Dec 23:43
@haf haf
Compare
Choose a tag to compare

In this release I give you an improved containsAll and better string diff messages. Thanks to @MNie for his contributions again!

sample-output-2

If you're thinking of contributing, you'll be happy to know, it's even easier to do now, since I've improved the internal tests (very meta).

/Henrik

v2.2.0 - String diffing!

23 Dec 21:26
@haf haf
Compare
Choose a tag to compare

In this release @MNie has added string diff support!

It looks like this:

string-diff-support

v2.1.1 – Bugfix release for summary/exit code

19 Dec 20:11
@haf haf
Compare
Choose a tag to compare

#29 fixed a bug that was introduced #19. Issues #23 #24 were created as a result and are now marked resolved.

v2.1.0 – `--summary`, assertion lib improvements

18 Dec 16:23
@haf haf
Compare
Choose a tag to compare

The v2.1.0 release comes with a nifty ability to print a summary of the tests run, thanks to the work of @Krzysztof-Cieslak. Just pass --summary to your executable to get it printed at the end of the test suite run.

Use v2.1.1 from nuget instead of v2.1.0.

v2.0 - filtering support, focus support, equality messages

12 Dec 13:29
@haf haf
Compare
Choose a tag to compare

I'm happy to announce a new major release of Expecto. This release contains many improvements for great good!

This release was made possible through the work of the following people.

Cred to you guys!

Henrik

v1.1.0 – Expecto.BenchmarkDotNet

01 Nov 22:34
@haf haf
Compare
Choose a tag to compare

This release marks the initial support for benchmark dot net.

screen shot 2016-11-01 at 23 31 20

Sample usage:

module Expecto.BenchmarkDotNetTests

open System
open System.Security.Cryptography
open Expecto
open BenchmarkDotNet

type Md5VsSha256() =
  let data : byte[] = Array.zeroCreate 10000
  do Random(42).NextBytes data

  let md5, sha256 = MD5.Create(), SHA256.Create()

  [<Benchmark>]
  member x.Sha256() = sha256.ComputeHash data
  [<Benchmark>]
  member x.Md5() = md5.ComputeHash(data)

[<Tests>]
let benchmarks =
  testList "some different benchmarks" [
    benchmark<Md5VsSha256> "md5 versus sha256" benchmarkConfig ignore
  ]

v1.0.12 – official release

28 Oct 08:00
@haf haf
Compare
Choose a tag to compare

This is the official release of Expecto.

Highlights:

  • Nicely coloured output
  • Parallel by default
  • Expect, the assertion/expectation module has been extended with many functions for asserting

Working towards:

  • All test failures should contain a Message that then can be nicely formatted and printed
  • Adding diffing support to longer structures, especially for the equal expectation function
  • Finding where FsCheck prints its 100 tests passed from and moving it towards the printing infrastructure