Skip to content

Commit

Permalink
Add isolation warning tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LakshanWeerasinghe committed Nov 27, 2023
1 parent 60ab121 commit aaea477
Show file tree
Hide file tree
Showing 2 changed files with 393 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,100 @@ public void testIsolationWarnings() {
int i = 0;
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 26, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 30, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 43, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 47, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 62, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 66, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 79, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 83, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 101, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 105, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 118, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 39, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 43, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 47, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 51, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 55, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 59, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 67, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 71, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 81, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 85, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 89, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 93, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 97, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 101, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 110, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 114, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 122, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 137, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 141, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 154, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 158, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 176, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 180, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 193, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 197, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 211, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 215, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 228, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 232, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 126, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 130, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 134, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 138, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 142, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 151, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 155, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 165, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 169, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 173, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 177, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 181, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 185, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 197, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 201, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 210, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 214, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 218, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 222, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 226, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 230, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 238, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 242, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 252, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 256, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 260, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 264, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 268, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 272, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 281, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 285, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 293, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 297, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 301, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 305, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 309, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 313, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 322, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 326, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 336, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 340, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 344, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 348, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 352, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 356, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 368, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_HINT, 372, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 381, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 385, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 389, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 393, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 397, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 401, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 409, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 413, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 423, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 427, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 431, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 435, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 439, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 443, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 451, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 455, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 463, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 467, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 471, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 475, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 479, 5);
validateHint(result, i++, NON_ISOLATED_METHOD_HINT, 483, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 492, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 496, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 506, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 510, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 514, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 518, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 522, 5);
validateHint(result, i++, NON_ISOLATED_SERVICE_AND_METHOD_HINT, 526, 5);
assertEquals(result.getHintCount(), i);

LineRange lineRange = result.getDiagnostics()[0].location().lineRange();
Expand Down
Loading

0 comments on commit aaea477

Please sign in to comment.