proptest list_to_pid_1
use super::*;
#[test]
-fn with_atom_errors_badarg() {
- errors_badarg(|_| Term::str_to_atom("atom", DoNotCare).unwrap());
-}
+fn without_list_errors_badarg() {
+ with_process_arc(|arc_process| {
+ TestRunner::new(Config::with_source_file(file!()))
+ .run(&strategy::term::is_not_list(arc_process.clone()), |list| {
+ prop_assert_eq!(erlang::list_to_pid_1(list), Err(badarg!()));
-#[test]
-fn with_local_reference_errors_badarg() {
- errors_badarg(|process| Term::next_local_reference(process));
-}
-
-#[test]
-fn with_empty_list_errors_badarg() {
- errors_badarg(|_| Term::EMPTY_LIST);
+ Ok(())
+ })
+ .unwrap();
+ });
}
#[test]
@@ -94,55 +92,3 @@ fn with_list_encoding_external_pid() {
));
});
}
-
-#[test]
-fn with_small_integer_errors_badarg() {
- errors_badarg(|process| 0.into_process(&process));
-}
-
-#[test]
-fn with_big_integer_errors_badarg() {
- errors_badarg(|process| (integer::small::MAX + 1).into_process(&process));
-}
-
-#[test]
-fn with_float_errors_badarg() {
- errors_badarg(|process| 1.0.into_process(&process));
-}
-
-#[test]
-fn with_local_pid_errors_badarg() {
- errors_badarg(|_| Term::local_pid(0, 0).unwrap());
-}
-
-#[test]
-fn with_external_pid_errors_badarg() {
- errors_badarg(|process| Term::external_pid(1, 0, 0, &process).unwrap());
-}
-
-#[test]
-fn with_tuple_errors_badarg() {
- errors_badarg(|process| Term::slice_to_tuple(&[], &process));
-}
-
-#[test]
-fn with_map_errors_badarg() {
- errors_badarg(|process| Term::slice_to_map(&[], &process));
-}
-
-#[test]
-fn with_heap_binary_is_false() {
- errors_badarg(|process| Term::slice_to_binary(&[], &process));
-}
-
-#[test]
-fn with_subbinary_errors_badarg() {
- errors_badarg(|process| bitstring!(1 :: 1, &process));
-}
-
-fn errors_badarg<S>(string: S)
-where
- S: FnOnce(&Process) -> Term,
-{
- super::errors_badarg(|process| erlang::list_to_pid_1(string(&process), &process))
-}
