Dataset Viewer
Auto-converted to Parquet Duplicate
index
int64
0
3.32k
project
stringclasses
7 values
file_path
stringclasses
228 values
function_name
stringlengths
3
214
start_line
int64
2
4.13k
end_line
int64
5
4.14k
original_path
stringclasses
228 values
filename
stringlengths
9
221
code
stringlengths
134
84.8k
thinking
stringlengths
9.53k
204k
unittest_gen
stringlengths
23
204k
0
abseil/abseil-cpp
absl/container/internal/layout.h
Find(Needle, Needle, Ts...)
66
70
absl/container/internal/layout.h
Find(Needle,_Needle,_Ts...)_1.cpp
#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #define ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #include <assert.h> #include <stddef.h> #include <stdint.h> #include <array> #include <string> #include <tuple> #include <type_traits> #include <typeinfo> #include <utility> #include "absl/base/attributes.h" #include "absl/base/config.h...
We are given the header file "absl/container/internal/layout.h" and we are to generate a test driver and a key-value JSON for the function under test. However, note that the provided header does not contain a single function but a class template `Layout` and its associated types. The function we are to test is not exp...
#include "layout.h" #include <gtest/gtest.h> namespace { TEST(Layout_PoisonPadding, TrueBranch) { absl::Layout<short, int> layout; char* p = nullptr; layout.PoisonPadding(p); } TEST(Layout_PoisonPadding, FalseBranch) { absl::Layout<int, short> layout; char* p = nullptr; layout.PoisonPadding(p); } } // n...
1
abseil/abseil-cpp
absl/container/internal/layout.h
Find(Needle, T, Ts...)
71
74
absl/container/internal/layout.h
Find(Needle,_T,_Ts...)_2.cpp
#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #define ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #include <assert.h> #include <stddef.h> #include <stdint.h> #include <array> #include <string> #include <tuple> #include <type_traits> #include <typeinfo> #include <utility> #include "absl/base/attributes.h" #include "absl/base/config.h...
We are given the header file `absl/container/internal/layout.h` and we are to generate a test driver and a key-value JSON for the function `Layout` (and its related classes) using concolic testing. However, note that the function under test is not a single function but a class template `Layout` and its nested classes....
#include "absl/container/internal/layout.h" #include "gtest/gtest.h" namespace { TEST(LayoutDebugString, OneType) { absl::container_internal::Layout<int> layout(1); std::string s = layout.DebugString(); EXPECT_FALSE(s.empty()); } TEST(LayoutDebugString, TwoTypes) { absl::container_internal::Layout<int, doubl...
2
abseil/abseil-cpp
absl/container/internal/layout.h
IsPow2(size_t)
75
75
absl/container/internal/layout.h
IsPow2(size_t)_3.cpp
#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #define ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #include <assert.h> #include <stddef.h> #include <stdint.h> #include <array> #include <string> #include <tuple> #include <type_traits> #include <typeinfo> #include <utility> #include "absl/base/attributes.h" #include "absl/base/config.h...
We are given a header file `absl/container/internal/layout.h` and we are to generate a test driver for a function in this header. However, note that the header does not contain a single function but a class template `Layout` and its internal helpers. The problem states: "the following function", but the header does not...
#include "absl/container/internal/layout.h" #include <gtest/gtest.h> #include <cstddef> #define ABSL_HAVE_ADDRESS_SANITIZER namespace { TEST(Layout_PoisonPadding, IntLong) { absl::container_internal::Layout<int, long> layout(0, 0); layout.PoisonPadding<char>(nullptr); } TEST(Layout_PoisonPadding, LongInt) { a...
3
abseil/abseil-cpp
absl/container/internal/layout.h
Align(size_t, size_t)
76
76
absl/container/internal/layout.h
Align(size_t,_size_t)_4.cpp
#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #define ABSL_CONTAINER_INTERNAL_LAYOUT_H_ #include <assert.h> #include <stddef.h> #include <stdint.h> #include <array> #include <string> #include <tuple> #include <type_traits> #include <typeinfo> #include <utility> #include "absl/base/attributes.h" #include "absl/base/config.h...
We are testing the `absl::container_internal::Layout` class and its related functions. However, note that the function we are testing is the entire `Layout` class and its methods, but in the context of concolic testing we focus on the branch coverage. The provided `layout.h` file defines a class template `Layout` th...
#include "absl/container/internal/layout.h" #include "gtest/gtest.h" namespace { TEST(AlignTest, Basic) { EXPECT_EQ(absl::container_internal::internal_layout::adl_barrier::Align(5, 4), 8); } } // namespace
4
abseil/abseil-cpp
absl/container/internal/layout.h
Min(size_t, size_t)
77
77
absl/container/internal/layout.h
Min(size_t,_size_t)_5.cpp
"#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#include <ass(...TRUNCATED)
"We are given a complex header file: absl/container/internal/layout.h\n The function we are to test (...TRUNCATED)
"#include \"absl/container/internal/layout.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(De(...TRUNCATED)
5
abseil/abseil-cpp
absl/container/internal/layout.h
Max(size_t)
78
78
absl/container/internal/layout.h
Max(size_t)_6.cpp
"#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#include <ass(...TRUNCATED)
"We are going to test the `absl::container_internal::Layout` class and its helper classes.\n However(...TRUNCATED)
"#include \"absl/container/internal/layout.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(La(...TRUNCATED)
6
abseil/abseil-cpp
absl/container/internal/layout.h
Max(size_t, size_t, Ts...)
79
82
absl/container/internal/layout.h
Max(size_t,_size_t,_Ts...)_7.cpp
"#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#include <ass(...TRUNCATED)
"We are going to test the `absl::container_internal::Layout` class and its methods.\n However, note (...TRUNCATED)
"#include \"absl/container/internal/layout.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(La(...TRUNCATED)
7
abseil/abseil-cpp
absl/container/internal/layout.h
TypeName()
83
92
absl/container/internal/layout.h
TypeName()_8.cpp
"#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#include <ass(...TRUNCATED)
"We are given the header file absl/container/internal/layout.h and need to generate a test driver an(...TRUNCATED)
"#include \"absl/container/internal/layout.h\"\n#include <gtest/gtest.h>\n\nnamespace {\n\nTEST(Layo(...TRUNCATED)
8
abseil/abseil-cpp
absl/container/internal/layout.h
Partial(Sizes &&...)
295
301
absl/container/internal/layout.h
Partial(Sizes_&&...)_9.cpp
"#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_\n#include <ass(...TRUNCATED)
"We are given a header file: absl/container/internal/layout.h\n We are to generate a C++ test driver(...TRUNCATED)
"#include \"absl/container/internal/layout.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(La(...TRUNCATED)
9
google/langsvr
src/lsp/encode.cc
Encode(int, int &)
3
5
src/lsp/encode.cc
Encode(int,_int_&)_1.cpp
"#include \"langsvr/lsp/encode.h\"\nnamespace langsvr::lsp {\nResult<const json::Value*> Encode(Null(...TRUNCATED)
"We are given a very simple function: `Result<const json::Value*> Encode(Null, json::Builder& b)`\n (...TRUNCATED)
"#include \"langsvr/lsp/encode.h\"\n#include \"gtest/gtest.h\"\n\nnamespace {\n\nTEST(EncodeTest, Nu(...TRUNCATED)
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
4