Plurrrr

Sun 04 Dec 2022

Functional table-driven tests in Go

There are numerous blog posts about table-driven tests in Go. In this blog post, I want to show a technique we have recently started using in our unit tests. I saw it the first time when my friend Matt Layher introduced it to me at work, and since then, I gradually started using it in places where it's suitable. This technique comes especially handy for large structs with multiple nested fields.

Source: Functional table-driven tests in Go, an article by Fatih Arslan.

Stone of Farewell

Following a brutal civil war, Osten Ard has been crushed under the rule of the two villainous High Kings. A single hope remains: if the rebels can find the three swords of legend - Memory, Sorrow and Thorn - they might be able to bring the Storm King and evil King Elias down.

Once but a humble kitchen-boy, Simon is now Simon Snowlock, dragonslayer and bearer of the mythical sword Thorn. But Simon is more alone than ever before: his friends have been imprisoned and his liege lord, Prince Josua, has been exiled. And the Storm King may also be in possession of one of the swords...

A single chance remains: if Simon can deliver Thorn to Joshua and lead his followers to the Stone of Farewell, the rebels may be able to muster the forces necessary to rise up against Elias and the Storm King. But no one knows where the Stone of Farewell is. Or, indeed, what it is...

In the evening I started in Stone of Farewell, Memory, Sorrow & Thorn Book 2 by Tad Williams.