From: Michael Wallner Date: Mon, 27 Dec 2021 13:47:27 +0000 (+0100) Subject: tests/Symbol/Table/Shared: lookup shared symbols in catalog X-Git-Tag: v0.1.0~51 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=3e41c7203adc1c7a00fe76c295d2abb8afc2d648;p=awesomized%2Fext-ion tests/Symbol/Table/Shared: lookup shared symbols in catalog --- diff --git a/tests/Symbol/Table/Shared.phpt b/tests/Symbol/Table/Shared.phpt index 8740f01..4227bdd 100644 --- a/tests/Symbol/Table/Shared.phpt +++ b/tests/Symbol/Table/Shared.phpt @@ -28,7 +28,15 @@ foreach (str_split($buf, 8) as $line) { echo "\n"; $u = new ion\Unserializer\PHP(multiSequence: true); -var_dump($u->unserialize($buf)); +var_dump($s = $u->unserialize($buf)); + +foreach ($s as $sym) { + /** @var ion\Symbol $sym */ + $t = $c->findBest($sym->importLocation->name); + $r = $t->findLocal($sym->importLocation->location); + printf("%s: %s@%d\n", $r->value, $sym->importLocation->name, + $sym->importLocation->location); +} $u = new ion\Unserializer\PHP(multiSequence: true, readerOptions: new ion\Reader\Options( @@ -104,6 +112,10 @@ array(4) { } } } +shared1: shared@1 +shared1: shared@1 +shared2: shared@2 +shared2: shared@2 on_context_change array(4) { [0]=>