From c2b3cc1a2f1ef09e0a3a3b69e8992ec71d75a558 Mon Sep 17 00:00:00 2001 From: belliash Date: Mon, 8 Apr 2019 10:24:32 +0200 Subject: [PATCH] Test magic methods. --- tests/magic_method.aer | 16 ++++++++++++++++ tests/magic_method.exp | 1 + 2 files changed, 17 insertions(+) create mode 100644 tests/magic_method.aer create mode 100644 tests/magic_method.exp diff --git a/tests/magic_method.aer b/tests/magic_method.aer new file mode 100644 index 0000000..76b888b --- /dev/null +++ b/tests/magic_method.aer @@ -0,0 +1,16 @@ +class Dog { + + void __invoke() { + print("I am a dog!\n"); + } +} + + +class Program { + + void main() { + object $dog = new Dog(); + $dog(); + } + +} diff --git a/tests/magic_method.exp b/tests/magic_method.exp new file mode 100644 index 0000000..07699fc --- /dev/null +++ b/tests/magic_method.exp @@ -0,0 +1 @@ +I am a dog!