Commit 912fbf57 authored by Howard Shrobe's avatar Howard Shrobe

Fix bug where oneof field isn't optional

parent 05a12c0f
......@@ -498,7 +498,7 @@
:parent message
;; One of :required, :optional or :repeated
:required nil
:required :optional
:index idx
:value slot
;; Fields parsed from .proto files usually get an accessor
......@@ -163,19 +163,8 @@ message DefinedMessage {
for expected-string in expected-strings
as position = (search expected-string actual-string :start2 index)
always position
do (setf index (+ position (length expected-string))))))
(do-field-test (field-type)
(let ((condition (assert-error undefined-field-type
(parse-message-with-field-type field-type))))
(list "Undefined type: Field "
"in message "
(format nil "has unknown type ~A" field-type))
(princ-to-string condition))
(assert-equal field-type (error-type-name condition))
(assert-equal "bar" (proto-name (error-field condition)))))
do (setf index (+ position (length expected-string))))))
(method-test-assertions (condition where method-lisp-name method-proto-name type)
(list (format nil "Undefined type: ~A type for RPC " where)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment