diff --git a/tests/cl-protobufs-tests.asd b/tests/cl-protobufs-tests.asd index 6ef69f41b39d70e33f4e544bdbb56357afb0fa86..fd1f04c0cef576c0664de4aab79f155c6342deb5 100644 --- a/tests/cl-protobufs-tests.asd +++ b/tests/cl-protobufs-tests.asd @@ -48,7 +48,8 @@ :depends-on ("wire-level-tests") :components ((:file "serialization-tests") - (:file "stability-tests"))) + (:file "stability-tests") + (:file "symbol-import-tests"))) ;; Geodata hack (:module "geodata-proto" diff --git a/tests/symbol-import-tests.lisp b/tests/symbol-import-tests.lisp new file mode 100644 index 0000000000000000000000000000000000000000..0de022810656d2dd574080ad5fb51441538023d8 --- /dev/null +++ b/tests/symbol-import-tests.lisp @@ -0,0 +1,28 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; ;;; +;;; Free Software published under an MIT-like license. See LICENSE ;;; +;;; ;;; +;;; Copyright (c) 2013 Google, Inc. All rights reserved. ;;; +;;; ;;; +;;; Original author: Alejandro SedeƱo ;;; +;;; ;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(in-package "PROTO-TEST") + +;;; Make sure we can import a schema by symbol name in a pure-lisp +;;; protobuf defintion. + +(eval-when (:compile-toplevel :load-toplevel :execute) + + (proto:define-schema symbol-imported-schema + (:package proto_test) + (proto:define-message symbol-imported-message ())) + +) ;eval-when + +(proto:define-schema symbol-importer-schema + (:package proto_test + :import symbol-imported-schema) + (proto:define-message symbol-importer-message () + (imported-type-field :type (or null symbol-imported-message))))