|
1 | 1 | /* |
2 | | - * Copyright (c) 2021-2023, NVIDIA CORPORATION. |
| 2 | + * Copyright (c) 2021-2025, NVIDIA CORPORATION. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -27,17 +27,17 @@ class GpuScalarUnitTest extends GpuUnitTests { |
27 | 27 | test("Test throws exception after closed") { |
28 | 28 | val gsv = GpuScalar(1, FloatType) |
29 | 29 | gsv.close() |
30 | | - assertThrows[NullPointerException](gsv.getBase) |
31 | | - assertThrows[NullPointerException](gsv.getValue) |
| 30 | + assertThrows[IllegalStateException](gsv.getBase) |
| 31 | + assertThrows[IllegalStateException](gsv.getValue) |
32 | 32 | assertThrows[NullPointerException](gsv.isValid) |
33 | | - assertThrows[NullPointerException](gsv.isNan) |
| 33 | + assertThrows[IllegalStateException](gsv.isNan) |
34 | 34 |
|
35 | 35 | val gsc = GpuScalar(Scalar.fromFloat(1), FloatType) |
36 | 36 | gsc.close() |
37 | | - assertThrows[NullPointerException](gsc.getBase) |
38 | | - assertThrows[NullPointerException](gsc.getValue) |
| 37 | + assertThrows[IllegalStateException](gsc.getBase) |
| 38 | + assertThrows[IllegalStateException](gsc.getValue) |
39 | 39 | assertThrows[NullPointerException](gsc.isValid) |
40 | | - assertThrows[NullPointerException](gsc.isNan) |
| 40 | + assertThrows[IllegalStateException](gsc.isNan) |
41 | 41 | } |
42 | 42 |
|
43 | 43 | test("Test closed too many times") { |
|
0 commit comments