(info1: DriverInfo, info2: DriverInfo)
| 10 | |
| 11 | /** @internal */ |
| 12 | export function isDriverInfoEqual(info1: DriverInfo, info2: DriverInfo): boolean { |
| 13 | /** for equality comparison, we consider "" as unset */ |
| 14 | const nonEmptyCmp = (s1: string | undefined, s2: string | undefined): boolean => { |
| 15 | s1 ||= undefined; |
| 16 | s2 ||= undefined; |
| 17 | |
| 18 | return s1 === s2; |
| 19 | }; |
| 20 | |
| 21 | return ( |
| 22 | nonEmptyCmp(info1.name, info2.name) && |
| 23 | nonEmptyCmp(info1.platform, info2.platform) && |
| 24 | nonEmptyCmp(info1.version, info2.version) |
| 25 | ); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * @internal |
no test coverage detected