Skip to content

Commit 1fecd52

Browse files
authored
Build the examples during make test (#96)
The `examples` target is not in `.PHONY`, and `examples/` is a real directory, so make treated the target as already satisfied and never ran the recipe. `digest-example` calls `Digest.sha256()` outside a `try`. That stopped compiling when #92 made the `Digest` constructors partial. Because the target was skipped, no one saw it. Closes #72
1 parent c2b4ba1 commit 1fecd52

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ all: test
7474
$(BUILD_DIR):
7575
mkdir -p $(BUILD_DIR)
7676

77-
.PHONY: all clean TAGS test test-one
77+
.PHONY: all clean TAGS test test-one examples

examples/digest-example/digest-example.pony

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use "../../ssl/crypto"
44

55
actor Main
66
new create(env: Env) =>
7-
let sha256digest: Digest = Digest.sha256()?
87
try
8+
let sha256digest: Digest = Digest.sha256()?
99
sha256digest.append("Hello ")?
1010
sha256digest.append("World")?
1111
let hash: Array[U8] val = sha256digest.final()?
@@ -16,8 +16,8 @@ actor Main
1616

1717
// SHAKE256 with variable-length output (OpenSSL 3.0.x or 4.0.x)
1818
ifdef "openssl_3.0.x" or "openssl_4.0.x" then
19-
let shake: Digest = Digest.shake256(64)?
2019
try
20+
let shake: Digest = Digest.shake256(64)?
2121
shake.append("Hello ")?
2222
shake.append("World")?
2323
let shake_hash: Array[U8] val = shake.final()?

0 commit comments

Comments
 (0)