GCC Code Coverage Report
Directory: ../ Exec Total Coverage
File: /home/iojs/build/workspace/node-test-commit-linux-coverage-daily/nodes/benchmark/out/../src/string_decoder-inl.h Lines: 8 8 100.0 %
Date: 2019-08-17 22:35:23 Branches: 0 0 - %

Line Branch Exec Source
1
#ifndef SRC_STRING_DECODER_INL_H_
2
#define SRC_STRING_DECODER_INL_H_
3
4
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
5
6
#include "string_decoder.h"
7
#include "util.h"
8
9
namespace node {
10
11
void StringDecoder::SetEncoding(enum encoding encoding) {
12
  state_[kBufferedBytes] = 0;
13
  state_[kMissingBytes] = 0;
14
  state_[kEncodingField] = encoding;
15
}
16
17
204223
enum encoding StringDecoder::Encoding() const {
18
204223
  return static_cast<enum encoding>(state_[kEncodingField]);
19
}
20
21
58717
unsigned StringDecoder::BufferedBytes() const {
22
58717
  return state_[kBufferedBytes];
23
}
24
25
49479
unsigned StringDecoder::MissingBytes() const {
26
49479
  return state_[kMissingBytes];
27
}
28
29
10354
char* StringDecoder::IncompleteCharacterBuffer() {
30
10354
  return reinterpret_cast<char*>(state_ + kIncompleteCharactersStart);
31
}
32
33
34
}  // namespace node
35
36
#endif  // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
37
38
#endif   // SRC_STRING_DECODER_INL_H_