(t *testing.T)
| 542 | } |
| 543 | |
| 544 | func TestRuntimeNextClassObjectIDOverflowReturnsZero(t *testing.T) { |
| 545 | const maxInt32 = int32(^uint32(0) >> 1) |
| 546 | |
| 547 | rt := &Runtime{} |
| 548 | rt.classObjectIDCounter.Store(maxInt32 - 1) |
| 549 | |
| 550 | first := rt.nextClassObjectID() |
| 551 | require.Equal(t, -(maxInt32), first) |
| 552 | second := rt.nextClassObjectID() |
| 553 | require.Zero(t, second) |
| 554 | } |
| 555 | |
| 556 | func TestRuntimeRegisterClassObjectIdentityOverflowReturnsZero(t *testing.T) { |
| 557 | const maxInt32 = int32(^uint32(0) >> 1) |
nothing calls this directly
no test coverage detected