<commit_before>@echo off

echo Generating C-style Win32 APIs and tests
call dart %~dp0win32\win32api.dart
call dart %~dp0metadata\win32.dart %~dp0..\lib\src\generated
call dart %~dp0win32\generate_win32_tests.dart 
echo.

echo Temporarily reset bthprops.dart (https://github.com/microsoft/win32metadata/issues/296)
git restore %~dp0..\lib\src\bthprops.dart
echo.

echo Generating COM classes and tests from Windows metadata
call dart %~dp0metadata\generate_com_apis.dart
echo.

echo Temporarily reset IProvideClassInfo_test.dart (https://github.com/microsoft/win32metadata/issues/290)
git restore %~dp0..\test\com\IProvideClassInfo_test.dart
echo.

echo Generating Windows Runtime classes from Windows metadata
call dart %~dp0metadata\winrt.dart %~dp0..\lib\src\generated
echo.

echo Formatting generated source code
call dart format %~dp0..\lib\src
call dart format %~dp0..\test\api_test.dart
call dart format %~dp0..\test\struct_test.dart
call dart format %~dp0..\test\com
echo.

echo Running tests
if "%1"=="--use-dart-test" goto dart_test
call flutter test
goto end

:dart_test
call dart test

:end<commit_msg>Remove old test generator<commit_after>@echo off

echo Generating C-style Win32 APIs and tests
call dart %~dp0win32\win32api.dart
call dart %~dp0metadata\win32.dart %~dp0..\lib\src\generated
echo.

echo Temporarily reset bthprops.dart (https://github.com/microsoft/win32metadata/issues/296)
git restore %~dp0..\lib\src\bthprops.dart
echo.

echo Generating COM classes and tests from Windows metadata
call dart %~dp0metadata\generate_com_apis.dart
echo.

echo Temporarily reset IProvideClassInfo_test.dart (https://github.com/microsoft/win32metadata/issues/290)
git restore %~dp0..\test\com\IProvideClassInfo_test.dart
echo.

echo Generating Windows Runtime classes from Windows metadata
call dart %~dp0metadata\winrt.dart %~dp0..\lib\src\generated
echo.

echo Formatting generated source code
call dart format %~dp0..\lib\src
call dart format %~dp0..\test\api_test.dart
call dart format %~dp0..\test\struct_test.dart
call dart format %~dp0..\test\com
echo.

echo Running tests
if "%1"=="--use-dart-test" goto dart_test
call flutter test
goto end

:dart_test
call dart test

:end
{'fraction_non_alphanumeric': 0.10948905109489052, 'fraction_numerical': 0.030565693430656935, 'mean_word_length': 4.832446808510638, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4466775', 'n_tokens_mistral': 813, 'n_tokens_neox': 747, 'n_words': 205}