Class: AdLint::Cc1::SingleValue

Inherits:
Value
  • Object
show all
Defined in:
lib/adlint/cc1/value.rb

Direct Known Subclasses

ArrayValue, CompositeValue, ScalarValue

Instance Method Summary collapse

Methods inherited from Value

#!, #!=, #%, #&, #*, #+, #+@, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #^, #ambiguous?, #array?, #coerce_to, #composite?, #contain?, #definite?, #dup, #eql?, #exist?, #hash, #invert_domain!, #logical_and, #logical_or, #narrow_domain!, #overwrite!, #scalar?, #single_value_unified_with, #test_may_be_equal_to, #test_may_be_false, #test_may_be_greater_than, #test_may_be_less_than, #test_may_be_null, #test_may_be_true, #test_may_not_be_equal_to, #test_must_be_equal_to, #test_must_be_false, #test_must_be_greater_than, #test_must_be_less_than, #test_must_be_null, #test_must_be_true, #test_must_not_be_equal_to, #to_defined_value, #to_enum, #undefined?, #widen_domain!, #|, #~

Methods included from BuggyValueSampler

#unique_sample

Instance Method Details

#multiple?Boolean

Returns:

  • (Boolean)


362
363
364
# File 'lib/adlint/cc1/value.rb', line 362

def multiple?
  false
end

#test_may_be_undefinedObject



370
371
372
373
374
375
# File 'lib/adlint/cc1/value.rb', line 370

def test_may_be_undefined
  # NOTE: SingleValue has exactly one value domain.
  #       So, the value of SingleValue may be undefined when the value
  #       must be undefined.
  self.test_must_be_undefined
end

#test_must_be_undefinedObject



366
367
368
# File 'lib/adlint/cc1/value.rb', line 366

def test_must_be_undefined
  TrivialValueTest.new(self.undefined?)
end

#to_single_valueObject



377
378
379
# File 'lib/adlint/cc1/value.rb', line 377

def to_single_value
  self
end