Carp/test/address.carp
Erik Svedäng 889f55fe8f
feat: Remove address (#1223)
* chore: Abuse deftemplate to get rid of Address

* chore: Avoid semicolon at end of define

* fix: address should be useable as an argument to a HOF

* chore: adapt examples to new address signature

* fix: Remove Address from typeOf

* fix: Remove more uses of Address

* fix: Remove more mentions of address in the Haskell code

* fix: Remove test that ensure you can't take the address of non-symbols

* refactor: Moved `address` to Pointer.carp

* refactor: Move address into Pointer module

Co-authored-by: Jorge Acereda <jacereda@gmail.com>
2021-05-27 22:04:46 +02:00

18 lines
448 B
Plaintext

(load "Test.carp")
(use Test)
(use Pointer)
(deftest test
(let [arr [1 2 3 4]]
(assert-equal test
&(Array.copy-map &address &arr)
&(Array.copy-map &address &arr)
"address works I"))
(assert-not-equal test
&(Array.copy-map &address &[1 2 3 4])
&(Array.copy-map &address &[1 2 3 4])
"address works II"
)
)