LCOV - code coverage report
Current view: top level - src - char-predicates.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 4 4 100.0 %
Date: 2017-04-26 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // Copyright 2011 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #include "src/char-predicates.h"
       6             : 
       7             : #ifdef V8_INTL_SUPPORT
       8             : #include "unicode/uchar.h"
       9             : #include "unicode/urename.h"
      10             : #endif  // V8_INTL_SUPPORT
      11             : 
      12             : namespace v8 {
      13             : namespace internal {
      14             : 
      15         114 : bool SupplementaryPlanes::IsIDStart(uc32 c) {
      16             :   DCHECK(c > 0xFFFF);
      17             : #ifdef V8_INTL_SUPPORT
      18             :   // This only works for code points in the SMPs, since ICU does not exclude
      19             :   // code points with properties 'Pattern_Syntax' or 'Pattern_White_Space'.
      20             :   // Code points in the SMP do not have those properties.
      21         114 :   return u_isIDStart(c);
      22             : #else
      23             :   // This is incorrect, but if we don't have ICU, use this as fallback.
      24             :   return false;
      25             : #endif  // V8_INTL_SUPPORT
      26             : }
      27             : 
      28             : 
      29         201 : bool SupplementaryPlanes::IsIDPart(uc32 c) {
      30             :   DCHECK(c > 0xFFFF);
      31             : #ifdef V8_INTL_SUPPORT
      32             :   // This only works for code points in the SMPs, since ICU does not exclude
      33             :   // code points with properties 'Pattern_Syntax' or 'Pattern_White_Space'.
      34             :   // Code points in the SMP do not have those properties.
      35         201 :   return u_isIDPart(c);
      36             : #else
      37             :   // This is incorrect, but if we don't have ICU, use this as fallback.
      38             :   return false;
      39             : #endif  // V8_INTL_SUPPORT
      40             : }
      41             : }  // namespace internal
      42             : }  // namespace v8

Generated by: LCOV version 1.10