diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-04-20 09:48:31 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-04-20 09:48:31 -0400 |
commit | 37073e44e9895ea4ecc18fdd0a9b54f5ebb052fa (patch) | |
tree | e82aac08fa2a06d2011fca367195daa35a5c17ae /src/mongo/idl/unittest.idl | |
parent | c192a1b9b1e223f8075ab5ce72dde372467f9650 (diff) | |
download | mongo-37073e44e9895ea4ecc18fdd0a9b54f5ebb052fa.tar.gz |
SERVER-28515 Add import support to IDL
Diffstat (limited to 'src/mongo/idl/unittest.idl')
-rw-r--r-- | src/mongo/idl/unittest.idl | 114 |
1 files changed, 4 insertions, 110 deletions
diff --git a/src/mongo/idl/unittest.idl b/src/mongo/idl/unittest.idl index d0705b7d260..252d1ead736 100644 --- a/src/mongo/idl/unittest.idl +++ b/src/mongo/idl/unittest.idl @@ -20,67 +20,11 @@ global: - "mongo/db/namespace_string.h" - "mongo/idl/idl_test_types.h" -types: - string: - bson_serialization_type: string - description: "A BSON UTF-8 string" - cpp_type: "std::string" - deserializer: "mongo::BSONElement::str" - - int: - bson_serialization_type: int - description: "A BSON 32-bit integer" - cpp_type: "std::int32_t" - deserializer: "mongo::BSONElement::_numberInt" - - long: - bson_serialization_type: long - description: "A BSON 64-bit integer" - cpp_type: "std::int64_t" - deserializer: "mongo::BSONElement::_numberLong" - - double: - bson_serialization_type: double - description: "A BSON 64-bit floating point number" - cpp_type: "double" - deserializer: "mongo::BSONElement::_numberDouble" - - decimal: - bson_serialization_type: double - description: "A BSON 128-bit floating point decimal number" - cpp_type: "mongo::Decimal128" - deserializer: "mongo::BSONElement::_numberDecimal" - - bool: - bson_serialization_type: bool - description: "A BSON bool" - cpp_type: "bool" - deserializer: "mongo::BSONElement::boolean" - - # TODO: support bindata - # bindata: - # bson_serialization_type: bindata - # cpp_type: "std:" - # deserializer: "mongo::BSONElement::str" - - objectid: - bson_serialization_type: objectid - description: "A BSON ObjectID" - cpp_type: "mongo::OID" - deserializer: "mongo::BSONElement::OID" - - date: - bson_serialization_type: date - description: "A BSON UTC DateTime" - cpp_type: "mongo::Date_t" - deserializer: "mongo::BSONElement::date" - - timestamp: - bson_serialization_type: timestamp - description: "A BSON TimeStamp" - cpp_type: "mongo::Timestamp" - deserializer: "mongo::BSONElement::timestamp" +imports: + - "mongo/idl/basic_types.idl" + - "mongo/idl/unittest_import.idl" +types: ################################################################################################## # # Test a custom non-BSONElement deserialization and serialization methods for a string type @@ -137,57 +81,7 @@ types: deserializer: "mongo::BSONElement::numberInt" -################################################################################################## -# -# Unit test structs for a single value to ensure type validation works correctly -# -################################################################################################## - structs: - one_string: - description: UnitTest for a single string - fields: - value: string - - one_int: - description: UnitTest for a single int - fields: - value: int - - one_long: - description: UnitTest for a single long - fields: - value: long - - one_double: - description: UnitTest for a single double - fields: - value: double - - one_decimal: - description: UnitTest for a single decimal - fields: - value: decimal - - one_bool: - description: UnitTest for a single bool - fields: - value: bool - - one_objectid: - description: UnitTest for a single objectid - fields: - value: objectid - - one_date: - description: UnitTest for a single date - fields: - value: date - - one_timestamp: - description: UnitTest for a single timestamp - fields: - value: timestamp ################################################################################################## # |