Remove explicit string deriving code in favor of immediate

This commit is contained in:
Ayaz Hafiz 2022-07-13 10:42:30 -04:00
parent 9a66e936a8
commit 568e8d9475
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 1 additions and 113 deletions

View file

@ -515,25 +515,7 @@ fn immediates() {
check_immediate(v!(DEC), Symbol::ENCODE_DEC);
check_immediate(v!(F32), Symbol::ENCODE_F32);
check_immediate(v!(F64), Symbol::ENCODE_F64);
}
#[test]
fn string() {
derive_test(v!(STR), |golden| {
assert_snapshot!(golden, @r###"
# derived for Str
# Str -[[toEncoder_string(0)]]-> Encoder fmt | fmt has EncoderFormatting
# Str -[[toEncoder_string(0)]]-> (List U8, fmt -[[custom(2) Str]]-> List U8) | fmt has EncoderFormatting
# Specialization lambda sets:
# @<1>: [[toEncoder_string(0)]]
# @<2>: [[custom(2) Str]]
#Derived.toEncoder_string =
\#Derived.s ->
Encode.custom \#Derived.bytes, #Derived.fmt ->
Encode.appendWith #Derived.bytes (Encode.string #Derived.s) #Derived.fmt
"###
)
})
check_immediate(v!(STR), Symbol::ENCODE_STRING);
}
#[test]