github.com/johnnyeven/libtools@v0.0.0-20191126065708-61829c1adf46/vin-code/misc/vehicle_mfrs_test.go (about)

     1  package misc
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestGetMFRS(t *testing.T) {
     8  	vin1 := "JA45"
     9  	vin1Expect := "Mitsubishi"
    10  	vin2 := "JA23"
    11  	vin2Expect := "Isuzu"
    12  	vin3 := "AAAA"
    13  	vin3Expect := UnknownMFRS
    14  
    15  	if vin1Expect != GetVINManuf(vin1) {
    16  		t.Error(vin1, vin1Expect, GetVINManuf(vin1))
    17  	}
    18  	if vin2Expect != GetVINManuf(vin2) {
    19  		t.Error(vin2, vin2Expect, GetVINManuf(vin2))
    20  	}
    21  	if vin3Expect != GetVINManuf(vin3) {
    22  		t.Error(vin3, vin3Expect, GetVINManuf(vin3))
    23  	}
    24  
    25  }