diff options
author | Hans Bolinder <[email protected]> | 2017-11-15 12:57:15 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2017-11-22 15:07:46 +0100 |
commit | cf349b8dc02123c97ad8027594b9792d846fd6a2 (patch) | |
tree | 820d4f6083c7429cef6c7d30b78718532319cf1f /lib | |
parent | a41bfcdf524dd94a9a760ab3dd0d375896e5a7f7 (diff) | |
download | otp-cf349b8dc02123c97ad8027594b9792d846fd6a2.tar.gz otp-cf349b8dc02123c97ad8027594b9792d846fd6a2.tar.bz2 otp-cf349b8dc02123c97ad8027594b9792d846fd6a2.zip |
dialyzer: Use string:find() instead of string:str()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dialyzer/test/plt_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dialyzer/test/plt_SUITE.erl b/lib/dialyzer/test/plt_SUITE.erl index a8a9f176fc..680f5b5088 100644 --- a/lib/dialyzer/test/plt_SUITE.erl +++ b/lib/dialyzer/test/plt_SUITE.erl @@ -283,8 +283,8 @@ bad_dialyzer_attr(Config) -> {dialyzer_error, "Analysis failed with error:\n" ++ Str1} = (catch dialyzer:run(Opts)), - P1 = string:str(Str1, "dial.erl:2: function undef/0 undefined"), - true = P1 > 0, + S1 = string:find(Str1, "dial.erl:2: function undef/0 undefined"), + true = is_list(S1), Prog2 = <<"-module(dial). -dialyzer({no_return, [{undef,1,2}]}).">>, @@ -292,9 +292,9 @@ bad_dialyzer_attr(Config) -> {dialyzer_error, "Analysis failed with error:\n" ++ Str2} = (catch dialyzer:run(Opts)), - P2 = string:str(Str2, "dial.erl:2: badly formed dialyzer " - "attribute: {no_return,{undef,1,2}}"), - true = P2 > 0, + S2 = string:find(Str2, "dial.erl:2: badly formed dialyzer " + "attribute: {no_return,{undef,1,2}}"), + true = is_list(S2), ok. |