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: json_scanner_test.go
    path of file: ./repos/mongo-go-driver/bson/bsonrw
    
    the code of the file until where you have to start completion: // Copyright (C) MongoDB, Inc. 2017-present.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

package bsonrw

import (
	"strings"
	"testing"
	"testing/iotest"

	"github.com/google/go-cmp/cmp"
)

func jttDiff(t *testing.T, expected, actual jsonTokenType, desc string) {
	if diff := cmp.Diff(expected, actual); diff != "" {
		t.Helper()
		t.Errorf("%s: Incorrect JSON Token Type (-want, +got): %s\n", desc, diff)
		t.FailNow()
	}
}

func jtvDiff(t *testing.T, expected, actual interface{}, desc string) {
	if diff := cmp.Diff(expected, actual); diff != "" {
		t.Helper()
		t.Errorf("%s: Incorrect JSON Token Value (-want, +got): %s\n", desc, diff)
		t.FailNow()
	}
}
    
func TestJsonScannerInvalidInputs(t *testing.T) {
	cases := []jsonScannerTestCase{
		{desc: "missing quotation", input: `"missing`},
		{desc: "invalid escape character--first character", input: `"\invalid"`},
		{desc: "invalid escape character--middle", input: `"i\nv\alid"`},
		{desc: "invalid escape character--single quote", input: `"f\'oo"`},
		{desc: "invalid literal--trueee", input: "trueee"},
		{desc: "invalid literal--tire", input: "tire"},
		{desc: "invalid literal--nulll", input: "nulll"},
		{desc: "invalid literal--fals", input: "fals"},
		{desc: "invalid literal--falsee", input: "falsee"},
		{desc: "invalid literal--fake", input: "fake"},
		{desc: "invalid literal--bad", input: "bad"},
		{desc: "invalid number: -", input: "-"},
		{desc: "invalid number: --0", input: "--0"},
		{desc: "invalid number: -a", input: "-a"},
		{desc: "invalid number: 00", input: "00"},
		{desc: "invalid number: 01", input: "01"},
		{desc: "invalid number: 0-", input: "0-"},
		{desc: "invalid number: 1-", input: "1-"},
		{desc: "invalid number: 0..", input: "0.."},
		{desc: "invalid number: 0.-", input: "0.-"},
		{desc: "invalid number: 0..0", input: "0..0"},
		{desc: "invalid number: 0.1.0", input: "0.1.0"},
		{desc: "invalid number: 0e", input: "0e"},
		{desc: "invalid number: 0e.", input: "0e."},
		{desc: "invalid number: 0e1.", input: "0e1."},
		{desc: "invalid number: 0e1e", input: "0e1e"},
		{desc: "invalid number: 0e+.1", input: "0e+.1"},
		{desc: "invalid number: 0e+1.", input: "0e+1."},
		{desc: "invalid number: 0e+1e", input: "0e+1e"},
	}

	for _, tc := range cases {
		t.Run(tc.desc, func(t *testing.T) {
			js := &jsonScanner{r: strings.NewReader(tc.input)}

			c, err := js.nextToken()
			expectNilToken(t, c, tc.desc)
			expectError(t, err, tc.desc)
		})
	}
}