package main

import "testing"

func TestTotal(t *testing.T) {
	for _, x := range []struct{ price, quantity, want int }{{7, 6, 42}, {0, 3, 0}, {5, 0, 0}} {
		if got := total(x.price, x.quantity); got != x.want {
			t.Fatal(got, x.want)
		}
	}
}
