The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

String starts_with/ends_with tests should run unconditionally (#13741)

authored by

hhugo and committed by
GitHub
137dd26a 8f2daefe

+15 -12
+15 -12
testsuite/tests/lib-string/test_string.ml
··· 60 60 while !sz <= 0 do push big l; sz += Sys.max_string_length done; 61 61 try ignore (String.concat "" !l); assert false 62 62 with Invalid_argument _ -> (); 63 - assert(String.starts_with ~prefix:"foob" "foobarbaz"); 64 - assert(String.starts_with ~prefix:"" "foobarbaz"); 65 - assert(String.starts_with ~prefix:"" ""); 66 - assert(not (String.starts_with ~prefix:"foobar" "bar")); 67 - assert(not (String.starts_with ~prefix:"foo" "")); 68 - assert(not (String.starts_with ~prefix:"fool" "foobar")); 69 - assert(String.ends_with ~suffix:"baz" "foobarbaz"); 70 - assert(String.ends_with ~suffix:"" "foobarbaz"); 71 - assert(String.ends_with ~suffix:"" ""); 72 - assert(not (String.ends_with ~suffix:"foobar" "bar")); 73 - assert(not (String.ends_with ~suffix:"foo" "")); 74 - assert(not (String.ends_with ~suffix:"obaz" "foobar")); 75 63 end 64 + 65 + let () = 66 + assert(String.starts_with ~prefix:"foob" "foobarbaz"); 67 + assert(String.starts_with ~prefix:"" "foobarbaz"); 68 + assert(String.starts_with ~prefix:"" ""); 69 + assert(not (String.starts_with ~prefix:"foobar" "bar")); 70 + assert(not (String.starts_with ~prefix:"foo" "")); 71 + assert(not (String.starts_with ~prefix:"fool" "foobar")); 72 + assert(String.ends_with ~suffix:"baz" "foobarbaz"); 73 + assert(String.ends_with ~suffix:"" "foobarbaz"); 74 + assert(String.ends_with ~suffix:"" ""); 75 + assert(not (String.ends_with ~suffix:"foobar" "bar")); 76 + assert(not (String.ends_with ~suffix:"foo" "")); 77 + assert(not (String.ends_with ~suffix:"obaz" "foobar")); 78 + ;;