gentests

package
v0.0.0-...-92d2af9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 0 Imported by: 0

README

Tests for generated code

This directory contains generated tests that ensure code generated by the xsdgen package can marshal and unmarshal documents described by an XML schema.

Updating tests

To update the tests here, run

go generate

Tests should be re-generated any time code generation behavior is changed.

Adding a new test

Adding a new test (and making it pass) is a great way to ensure your use case continues to work. Create a new subdirectory with the following:

  • An XML schema file with the extension .xsd
  • A sample XML document that conforms to the schema with extension .xml

If possible, use a small schema, or trim down an existing schema.

Documentation

Overview

Package gentest generates marshal/unmarshal tests for the xsdgen package.

Directories

Path Synopsis
testgen is a wrapper around xsdgen that generates unit for generated code.
testgen is a wrapper around xsdgen that generates unit for generated code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL