Skip to content

Commit 6a84f62

Browse files
author
Zishan Mirza
committed
fix: fixed tests for asctime and removed unnecessary header include
statements
1 parent 1584628 commit 6a84f62

File tree

11 files changed

+10
-20
lines changed

11 files changed

+10
-20
lines changed

libc/src/time/asctime.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/time/asctime.h"
10-
#include "src/__support/common.h"
11-
#include "src/__support/macros/config.h"
1210
#include "src/time/time_utils.h"
1311

1412
namespace LIBC_NAMESPACE_DECL {

libc/src/time/asctime_r.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/time/asctime_r.h"
10-
#include "src/__support/common.h"
11-
#include "src/__support/macros/config.h"
1210
#include "src/time/time_utils.h"
1311

1412
namespace LIBC_NAMESPACE_DECL {

libc/src/time/ctime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "ctime.h"
10-
#include "time_utils.h"
9+
#include "src/time/ctime.h"
10+
#include "src/time/time_utils.h"
1111

1212
namespace LIBC_NAMESPACE_DECL {
1313

libc/src/time/ctime_r.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "ctime_r.h"
10-
#include "time_utils.h"
9+
#include "src/time/ctime_r.h"
10+
#include "src/time/time_utils.h"
1111

1212
namespace LIBC_NAMESPACE_DECL {
1313

libc/src/time/linux/localtime.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//===-- Linux implementation of the localtime function
2-
//------------------------===//
1+
//===-- Linux implementation of the localtime function --------------------===//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
54
// See https://llvm.org/LICENSE.txt for license information.

libc/src/time/linux/localtime_r.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/time/localtime_r.h"
10-
#include "src/__support/common.h"
11-
#include "src/__support/macros/config.h"
1210
#include "src/time/time_utils.h"
1311

1412
namespace LIBC_NAMESPACE_DECL {

libc/src/time/linux/localtime_s.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/time/localtime_s.h"
10-
#include "src/__support/common.h"
11-
#include "src/__support/macros/config.h"
1210
#include "src/time/time_utils.h"
1311

1412
namespace LIBC_NAMESPACE_DECL {

libc/src/time/time_utils.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
#ifndef LLVM_LIBC_SRC_TIME_TIME_UTILS_H
1010
#define LLVM_LIBC_SRC_TIME_TIME_UTILS_H
1111

12-
#include <time.h>
13-
1412
#include "src/__support/CPP/limits.h"
1513
#include "src/errno/libc_errno.h"
16-
#include "timezone.h"
17-
#include <stdio.h>
14+
#include "src/time/timezone.h"
15+
#include <time.h>
1816

1917
namespace LIBC_NAMESPACE_DECL {
2018
namespace time_utils {

libc/test/src/time/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ add_libc_unittest(
1414
DEPENDS
1515
libc.src.time.timezone
1616
libc.src.time.asctime
17+
libc.src.stdio.fopen
1718
)
1819

1920
add_libc_unittest(
@@ -30,6 +31,7 @@ add_libc_unittest(
3031
DEPENDS
3132
libc.src.time.timezone
3233
libc.src.time.asctime_r
34+
libc.src.stdio.fopen
3335
)
3436

3537
add_libc_unittest(

libc/test/src/time/asctime_r_test.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "src/errno/libc_errno.h"
109
#include "src/time/asctime_r.h"
1110
#include "src/time/time_utils.h"
1211
#include "test/UnitTest/Test.h"

0 commit comments

Comments
 (0)