improve tests, add code source to LICENSE
This commit is contained in:
parent
09099a5298
commit
3d57590b88
4
LICENSE
4
LICENSE
@ -17,3 +17,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
The code is based on the charset implementation of hyper:
|
||||||
|
https://github.com/hyperium/hyper/blob/7b108466f6a53d0ffdc6c7889d1a01fca251e462/src/header/shared/charset.rs
|
||||||
|
licensed under MIT, written by seanmonstar, SBSTP, hugoduncan, fhartwig and Pyfisch.
|
||||||
|
@ -201,12 +201,14 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_display() {
|
fn test_display() {
|
||||||
assert_eq!("US-ASCII", format!("{}", UsAscii));
|
assert_eq!("US-ASCII", UsAscii.to_string());
|
||||||
assert_eq!("ABCD", format!("{}", Unregistered("ABCD".to_owned())));
|
assert_eq!("ABCD", Unregistered("ABCD".to_owned()).to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_cmp() {
|
fn test_cmp() {
|
||||||
|
assert!(Iso88593 == Iso88593);
|
||||||
|
assert!(UsAscii != Iso88593);
|
||||||
assert_eq!(Unregistered("foobar".to_owned()), Unregistered("FOOBAR".to_owned()));
|
assert_eq!(Unregistered("foobar".to_owned()), Unregistered("FOOBAR".to_owned()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user