tools/mac/power/collapse_profile_test.py
def testSynonymMarkers(self):
    """Tests that two markers that are synonyms trigger the addition of the same
    synthetic frame."""

    samples = [{'frames': ['foo', 'bar', '::network'], 'weight': 24}]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()

    samples_2 = [{'frames': ['foo', 'bar', '::net'], 'weight': 24}]
    stack_collapser_2 = StackCollapser('./samples.collapsed')
    stack_collapser_2.set_samples_for_testing(samples_2)
    stack_collapser_2.post_process_samples()

    # Same synthetic stack frame is added.
    self.assertEquals(stack_collapser.samples[0]["frames"][0],
                      stack_collapser_2.samples[0]["frames"][0])
Tests that two markers that are synonyms trigger the addition of the same
    synthetic frame.
Tests that two markers that are synonyms trigger the addition of the same
synthetic frame.
Tests that two markers that are synonyms trigger the addition of the same synthetic frame .
def testSynonymMarkers(self):
    samples = [{'frames': ['foo', 'bar', '::network'], 'weight': 24}]
    stack_collapser = StackCollapser('./samples.collapsed')
    stack_collapser.set_samples_for_testing(samples)
    stack_collapser.post_process_samples()
    samples_2 = [{'frames': ['foo', 'bar', '::net'], 'weight': 24}]
    stack_collapser_2 = StackCollapser('./samples.collapsed')
    stack_collapser_2.set_samples_for_testing(samples_2)
    stack_collapser_2.post_process_samples()
    self.assertEquals(stack_collapser.samples[0]["frames"][0],
                      stack_collapser_2.samples[0]["frames"][0])
def testSynonymMarkers ( self ) : samples = [ { 'frames' : [ 'foo' , 'bar' , '::network' ] , 'weight' : 24 } ] stack_collapser = StackCollapser ( './samples.collapsed' ) stack_collapser . set_samples_for_testing ( samples ) stack_collapser . post_process_samples ( ) samples_2 = [ { 'frames' : [ 'foo' , 'bar' , '::net' ] , 'weight' : 24 } ] stack_collapser_2 = StackCollapser ( './samples.collapsed' ) stack_collapser_2 . set_samples_for_testing ( samples_2 ) stack_collapser_2 . post_process_samples ( ) self . assertEquals ( stack_collapser . samples [ 0 ] [ "frames" ] [ 0 ] , stack_collapser_2 . samples [ 0 ] [ "frames" ] [ 0 ] )
Tests that two markers that are synonyms trigger the addition of the same
synthetic frame.
Tests that two markers that are synonyms trigger the addition of the same synthetic frame .
"""Tests that two markers that are synonyms trigger the addition of the same
    synthetic frame.""" # Same synthetic stack frame is added.
self