Skip to content

Commit

Permalink
[tests/ffi]: Fix failing pointer arithmetic test.
Browse files Browse the repository at this point in the history
Closes #54397.

R=dacoharkes@google.com

Cq-Include-Trybots: luci.dart.try:vm-aot-asan-linux-release-x64-try,vm-asan-linux-release-x64-try
Change-Id: I4ae2cbc7f4eee1bfcd6d608dbc0d838da703c7e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342460
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Shikhar <shikharish05@gmail.com>
  • Loading branch information
shikharish authored and dcharkes committed Dec 18, 2023
1 parent 83ba9fe commit 81dc3f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/ffi/pointer_arithmetic_operators_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:ffi/ffi.dart';

void main() {
Pointer<Int32> p = calloc<Int32>(3);
final p1 = p;
p.value = 1;
(p + 1).value = 2;
(p + 2).value = 3;
Expand All @@ -17,4 +18,5 @@ void main() {
Expect.equals(3, p.value);
p -= 1;
Expect.equals(2, p.value);
calloc.free(p1);
}

0 comments on commit 81dc3f6

Please sign in to comment.