aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl')
-rw-r--r--lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl b/lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl
new file mode 100644
index 0000000000..d098884f4d
--- /dev/null
+++ b/lib/dialyzer/test/small_tests_SUITE_data/src/process_info_test.erl
@@ -0,0 +1,21 @@
+%%
+%% Tests hardcoded dependent type info for process_info/1
+%%
+-module(process_info_test).
+-export([pinfo/1]).
+
+pinfo(P) when node(P) == node() -> % On same node
+ case process_info(P) of
+ undefined ->
+ exit(dead);
+ Info -> Info
+ end;
+pinfo(P) -> % On different node
+ case rpc:call(node(P), erlang, process_info, [P]) of
+ {badrpc, _} ->
+ exit(badrpc);
+ undefined -> % This does happen
+ exit(dead);
+ Info -> Info
+ end.
+