You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: hardwarecharacteristics_test.go
    path of file: ./repos/juju/core/instance
    
    the code of the file until where you have to start completion: // Copyright 2013 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package instance_test

import (
	jc "github.com/juju/testing/checkers"
	gc "gopkg.in/check.v1"

	"github.com/juju/juju/core/instance"
)

type HardwareSuite struct{}

var _ = gc.Suite(&HardwareSuite{})

type parseHardwareTestSpec struct {
	summary string
	args    []string
	hc      *instance.HardwareCharacteristics
	err     string
}

type HC = instance.Har
    
func (ts *parseHardwareTestSpec) check(c *gc.C) {
	hwc, err := instance.ParseHardware(ts.args...)

	// Check the spec'ed error condition first.
	if ts.err != "" {
		c.Check(err, gc.ErrorMatches, ts.err)
		// We expected an error so we don't worry about checking hwc.
		return
	} else if !c.Check(err, jc.ErrorIsNil) {
		// We got an unexpected error so we don't worry about checking hwc.
		return
	}

	// The error condition matched so we check hwc.
	cons1, err := instance.ParseHardware(hwc.String())
	if !c.Check(err, jc.ErrorIsNil) {
		// Parsing didn't work so we don't worry about checking hwc.
		return
	}

	// Compare the round-tripped HWC.
	c.Check(cons1, gc.DeepEquals, hwc)

	// If ts.hc is provided, check that too (so we're not just relying on the
	// round trip via String).
	if ts.hc != nil {
		c.Check(hwc, gc.DeepEquals, *ts.hc)
	}
}