Last active
          August 29, 2015 14:26 
        
      - 
      
- 
        Save kwalrath/dab00eb68704900f70ba to your computer and use it in GitHub Desktop. 
    assert
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | main() { | |
| var text = 'Hi'; | |
| var number = 99; | |
| var urlString = 'https://github.com/'; | |
| // Make sure the variable has a non-null value. | |
| assert(text != null); | |
| // Make sure the value is less than 100. | |
| assert(number < 100); | |
| // Make sure this is an https URL. | |
| assert(urlString.startsWith('https')); | |
| print('About to call assert(false).'); | |
| assert(false); | |
| print('Oops, you weren\'t running in checked mode.'); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment