Add variables to test to prove linkage is correct.

pull/1943/head
Elliott Sales de Andrade 8 years ago
parent 48580ac8a3
commit c09586462c
  1. 17
      test cases/common/160 duplicate source names/dir1/file.c
  2. 1
      test cases/common/160 duplicate source names/dir2/dir1/file.c
  3. 1
      test cases/common/160 duplicate source names/dir2/file.c
  4. 1
      test cases/common/160 duplicate source names/dir3/dir1/file.c
  5. 1
      test cases/common/160 duplicate source names/dir3/file.c
  6. 2
      test cases/common/160 duplicate source names/dir3/meson.build
  7. 2
      test cases/common/160 duplicate source names/meson.build

@ -1 +1,16 @@
int main() { return 0; }
extern int dir2;
extern int dir2_dir1;
extern int dir3;
extern int dir3_dir1;
int main() {
if (dir2 != 20)
return 1;
if (dir2_dir1 != 21)
return 1;
if (dir3 != 30)
return 1;
if (dir3_dir1 != 31)
return 1;
return 0;
}

@ -1 +1 @@
lib = static_library('empty', 'file.c', 'dir1/file.c')
lib = static_library('lib', 'file.c', 'dir1/file.c')

@ -4,4 +4,4 @@ sources = []
subdir('dir1')
subdir('dir2')
subdir('dir3')
executable('a.out', sources : sources, objects : lib.extract_objects())
executable('a.out', sources : sources, objects : lib.extract_all_objects())

Loading…
Cancel
Save