Skip to content

Commit

Permalink
dart-lang#993. [ffi] nullptr test added
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov committed Oct 14, 2022
1 parent 3a768db commit 2193d42
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions LibTest/ffi/nullptr/nullptr_A01_t01.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

/// @assertion Pointer<Never> nullptr
/// final
/// Represents a pointer into the native C memory corresponding to 'NULL', e.g.
/// a pointer with address 0.
///
/// @description Checks that this property represents a pointer with address 0
/// @author sgrekhov22@gmail.com
import "dart:ffi";
import "../../../Utils/expect.dart";

void main() {
Expect.equals(0, nullptr.address);
}

0 comments on commit 2193d42

Please sign in to comment.