Skip to content

Commit

Permalink
fixup! Debug windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Jun 24, 2023
1 parent 8d03dfa commit fe4ba27
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions tests/unit/clangTests.d
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ unittest
assert(locations[8].path == "tests/functional/include/subfile3.h");
assert(locations[9].path == "tests/functional/include/file.h");

version (Windows)
enum expectedOffset = 58;
else
enum expectedOffset = 50;

assert(locations[7].offset == expectedOffset);
assert(locations[7].offset == 50);
}

// Test TranslationUnit.includeLocations - a case without includes.
Expand Down Expand Up @@ -136,27 +131,13 @@ unittest
query(translUnit.location("tests/functional/include/file.h", 78)) <
query(translUnit.location("tests/functional/include/file.h", 79)));

{
version (Windows)
enum offset = 89;
else
enum offset = 76;

assert(
query(translUnit.location("tests/functional/include/subfile3.h", 1)) <
query(translUnit.location("tests/functional/include/file.h", offset)));
}

{
version (Windows)
enum offset = 88;
else
enum offset = 75;

assert(
query(translUnit.location("tests/functional/include/subfile3.h", 1)) >
query(translUnit.location("tests/functional/include/file.h", offset)));
}
assert(
query(translUnit.location("tests/functional/include/subfile3.h", 1)) <
query(translUnit.location("tests/functional/include/file.h", 76)));

assert(
query(translUnit.location("tests/functional/include/subfile3.h", 1)) >
query(translUnit.location("tests/functional/include/file.h", 75)));
}

// Test TranslationUnit.allInOrder.
Expand Down

0 comments on commit fe4ba27

Please sign in to comment.