Skip to content

Commit 8dabd5e

Browse files
committed
add tests
1 parent 759cc45 commit 8dabd5e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/data/feature-resolution.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message Message {
4949
map<string,int64> int64_map = 15;
5050
}
5151

52-
extend Message {
52+
extend ExtendedMessage {
5353
required int32 bar = 16 [features.amazing_feature = D];
5454
}
5555

tests/feature_resolution_editions.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,16 @@ tape.test("feature resolution editions", function(test) {
9090
return test.fail(err.message);
9191
test.same(root.features.amazing_feature, 'A');
9292
test.same(root.lookup("Message").features.amazing_feature, 'B')
93-
test.same(root.lookupService("MyService").features.amazing_feature, 'E');
9493
test.same(root.lookupEnum("SomeEnum").features.amazing_feature, 'C')
94+
test.same(root.deferred[0].features.amazing_feature, 'D')
95+
test.same(root.lookupService("MyService").features.amazing_feature, 'E');
96+
test.same(root.lookup("Message").fields.stringRepeated.features.amazing_feature, 'F')
9597
test.same(root.lookup("Message").lookupEnum("SomeEnumInMessage").features.amazing_feature, 'G')
9698
test.same(root.lookup("Message").lookup("Nested").features.amazing_feature, 'H')
97-
test.same(root.lookupService("MyService").lookup("MyMethod").features.amazing_feature, 'L')
98-
test.same(root.lookup("Message").fields.stringRepeated.features.amazing_feature, 'F')
9999
test.same(root.lookup("Message").lookup(".Message.bar").features.amazing_feature, 'I')
100+
test.same(root.lookup("Message").lookup("SomeOneOf").features.amazing_feature, 'J')
100101
test.same(root.lookupEnum("SomeEnum").valuesFeatures.ONE.amazing_feature, 'K')
102+
test.same(root.lookupService("MyService").lookup("MyMethod").features.amazing_feature, 'L')
101103

102104
test.end();
103105
})

0 commit comments

Comments
 (0)