Change "folder" to "dir" in tests

POSIX terminology is the best terminology.

No functional change.
This commit is contained in:
Kim Grasman 2019-06-30 12:35:46 +02:00 committed by Kim Gräsman
parent 91c0b55f7f
commit 08233e8e83
10 changed files with 92 additions and 92 deletions

View File

@ -150,7 +150,7 @@ class OneIwyuTest(unittest.TestCase):
'fwd_decl_class_template.cc': ['.'],
'fwd_decl_static_member.cc': ['.'],
'fwd_decl_with_instantiation.cc': ['.'],
'header_in_subfolder.cc': ['.'],
'header_in_subdir.cc': ['.'],
'implicit_ctor.cc': ['.'],
'include_cycle.cc': ['.'],
'include_with_using.cc': ['.'],

View File

@ -0,0 +1,30 @@
//===--- header_in_subdir.cc - test input file for iwyu -------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Test that subdirs are correctly recognized
#include "subdir/direct_subdir.h"
void foo() {
// IWYU: IndirectSubDirClass is...*indirect_subdir.h
IndirectSubDirClass ic;
}
/**** IWYU_SUMMARY
tests/cxx/header_in_subdir.cc should add these lines:
#include "tests/cxx/subdir/indirect_subdir.h"
tests/cxx/header_in_subdir.cc should remove these lines:
- #include "subdir/direct_subdir.h" // lines XX-XX
The full include-list for tests/cxx/header_in_subdir.cc:
#include "tests/cxx/subdir/indirect_subdir.h" // for IndirectSubDirClass
***** IWYU_SUMMARY */

View File

@ -0,0 +1,30 @@
//===--- header_in_subdir_nopath.cc - test input file for iwyu ------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Test that subdirs are correctly recognized. Use without "-I ."
#include "subdir/direct_subdir.h"
void foo() {
// IWYU: IndirectSubDirClass is...*indirect_subdir.h
IndirectSubDirClass ic;
}
/**** IWYU_SUMMARY
tests/cxx/header_in_subdir_nopath.cc should add these lines:
#include "subdir/indirect_subdir.h"
tests/cxx/header_in_subdir_nopath.cc should remove these lines:
- #include "subdir/direct_subdir.h" // lines XX-XX
The full include-list for tests/cxx/header_in_subdir_nopath.cc:
#include "subdir/indirect_subdir.h" // for IndirectSubDirClass
***** IWYU_SUMMARY */

View File

@ -1,30 +0,0 @@
//===--- header_in_subfolder.cc - test input file for iwyu ----------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Test that subfolders are correctly recognized
#include "subfolder/direct_subfolder.h"
void foo() {
// IWYU: IndirectSubfolderClass is...*indirect_subfolder.h
IndirectSubfolderClass ic;
}
/**** IWYU_SUMMARY
tests/cxx/header_in_subfolder.cc should add these lines:
#include "tests/cxx/subfolder/indirect_subfolder.h"
tests/cxx/header_in_subfolder.cc should remove these lines:
- #include "subfolder/direct_subfolder.h" // lines XX-XX
The full include-list for tests/cxx/header_in_subfolder.cc:
#include "tests/cxx/subfolder/indirect_subfolder.h" // for IndirectSubfolderClass
***** IWYU_SUMMARY */

View File

@ -1,30 +0,0 @@
//===--- header_in_subfolder_nopath.cc - test input file for iwyu ---------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Test that subfolders are correctly recognized. Use without "-I ."
#include "subfolder/direct_subfolder.h"
void foo() {
// IWYU: IndirectSubfolderClass is...*indirect_subfolder.h
IndirectSubfolderClass ic;
}
/**** IWYU_SUMMARY
tests/cxx/header_in_subfolder_nopath.cc should add these lines:
#include "subfolder/indirect_subfolder.h"
tests/cxx/header_in_subfolder_nopath.cc should remove these lines:
- #include "subfolder/direct_subfolder.h" // lines XX-XX
The full include-list for tests/cxx/header_in_subfolder_nopath.cc:
#include "subfolder/indirect_subfolder.h" // for IndirectSubfolderClass
***** IWYU_SUMMARY */

View File

@ -14,11 +14,11 @@
#include <list>
#include <map>
#include <memory>
#include "subfolder/indirect_subfolder.h"
#include "subdir/indirect_subdir.h"
#include "quoted_includes_first.h"
std::unique_ptr<IndirectSubfolderClass> CreateIndirectSubfolderClass() {
return std::unique_ptr<IndirectSubfolderClass>(new IndirectSubfolderClass);
std::unique_ptr<IndirectSubDirClass> CreateIndirectSubDirClass() {
return std::unique_ptr<IndirectSubDirClass>(new IndirectSubDirClass);
}
/**** IWYU_SUMMARY
@ -33,7 +33,7 @@ tests/cxx/quoted_includes_first.cc should remove these lines:
The full include-list for tests/cxx/quoted_includes_first.cc:
#include "tests/cxx/pch.h"
#include "quoted_includes_first.h"
#include "subfolder/indirect_subfolder.h" // for IndirectSubfolderClass
#include "subdir/indirect_subdir.h" // for IndirectSubDirClass
#include <memory> // for unique_ptr
***** IWYU_SUMMARY */

View File

@ -11,23 +11,23 @@
#include <list>
#include <map>
#include <memory>
#include "subfolder/indirect_subfolder.h"
#include "subdir/indirect_subdir.h"
std::unique_ptr<IndirectSubfolderClass> CreateIndirectSubfolderClass();
std::unique_ptr<IndirectSubDirClass> CreateIndirectSubDirClass();
/**** IWYU_SUMMARY
tests/cxx/quoted_includes_first.h should add these lines:
class IndirectSubfolderClass;
class IndirectSubDirClass;
tests/cxx/quoted_includes_first.h should remove these lines:
- #include "subfolder/indirect_subfolder.h" // lines XX-XX
- #include "subdir/indirect_subdir.h" // lines XX-XX
- #include <iostream> // lines XX-XX
- #include <list> // lines XX-XX
- #include <map> // lines XX-XX
The full include-list for tests/cxx/quoted_includes_first.h:
#include <memory> // for unique_ptr
class IndirectSubfolderClass;
class IndirectSubDirClass;
***** IWYU_SUMMARY */

View File

@ -0,0 +1,17 @@
//===--- direct_subdir.h - test input file for iwyu -----------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// This file includes only another file in the subdir
#ifndef INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBDIR_H_
#define INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBDIR_H_
#include "indirect_subdir.h"
#endif // INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBDIR_H_

View File

@ -1,4 +1,4 @@
//===--- indirect_subfolder.h - test input file for iwyu ------------------===//
//===--- indirect_subdir.h - test input file for iwyu ---------------------===//
//
// The LLVM Compiler Infrastructure
//
@ -8,9 +8,9 @@
//===----------------------------------------------------------------------===//
#ifndef INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBFOLDER_H_
#define INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBFOLDER_H_
#ifndef INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBDIR_H_
#define INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBDIR_H_
class IndirectSubfolderClass {};
class IndirectSubDirClass {};
#endif // INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBFOLDER_H_
#endif // INCLUDE_WHAT_YOU_USE_TESTS_INDIRECT_SUBDIR_H_

View File

@ -1,17 +0,0 @@
//===--- direct_subfolder.h - test input file for iwyu --------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// This file includes only another file in the subfolder
#ifndef INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBFOLDER_H_
#define INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBFOLDER_H_
#include "indirect_subfolder.h"
#endif // INCLUDE_WHAT_YOU_USE_TESTS_DIRECT_SUBFOLDER_H_